[wp-docs] Codex page needs to be rewritten

Andrea andrea at ronandandrea.com
Mon Aug 17 14:58:10 UTC 2009


Frankie Roberto wrote:
> The final circumstance is where you want to display the most recent n 
> posts on the front page, but you also want to have a few paragraphs of 
> intro text at the top. For this, the ideal would be to use a Wordpress 
> page to hold the intro text, and then display the n posts beneath (with 
> the number based on the setting in options-reading.php). However, 
> because The Loop only displays the page content OR the posts, the only 
> way to achieve this (that I can find) is to create a new named template, 
> associate that with the page that's being used as the front page, and 
> then manually define a get_posts() function call within the template to 
> retrieve the most recent posts.

And this is what you would put in home.php. It's an either/or situation: 
you can use the drop-down option and pick a page, or you can use 
something specially coded in the form of home.php.

Making a special page template, then setting that page as the home via 
the drop-down accomplishes the same thing, but in more steps. One is 
geared to more novice users.

A.


More information about the wp-docs mailing list