[wp-docs] Codex page needs to be rewritten

Frankie Roberto frankie at frankieroberto.com
Mon Aug 17 17:15:05 UTC 2009


On Mon, Aug 17, 2009 at 3:58 PM, Andrea <andrea at ronandandrea.com> 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.


I'd love to use home.php as the simpler option. However I can't figure out
how to dynamically insert content into the home.php from a page in the
database, as selecting a page from the drop-down switches to the page.php
templates.  Perhaps it's an usual use-case, but I'd have expected Wordpress
to use the home.php template for both options, and to simply change what
content appears in The Loop.

Anyway, +1 to better documentation for this feature. I'll try to help if I
can.

Frankie

-- 
Frankie Roberto
Experience Designer, Rattle
0114 2706977
http://www.rattlecentral.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.automattic.com/pipermail/wp-docs/attachments/20090817/c3891fe2/attachment-0001.htm>


More information about the wp-docs mailing list