[wp-hackers] Wordpress 3.0 - the_content() in pages
Jeremy Clarke
jer at simianuprising.com
Wed Jun 23 00:49:37 UTC 2010
On Mon, Jun 21, 2010 at 11:02 AM, Austin Matzko <austin at ilfilosofo.com>wrote:
>
> You don't have to "loop," per se, just call "the_post()" to set up the
> current Loop object properties. Perhaps the_post() should be called
> prior to including singular templates, as you suggest, but if
> something similar happened in the past it was undocumented behavior.
>
It seems to me that that would also be undesirable. Working with single.php
and page.php is complicated because you often want to assume that it is one
big loop for the individual post being managed, but that is an assumption
that WP should not make.
It is very possible that other posts, from custom queries etc, may be shown
inside a single.php or page.php screen before the main content, the result
of making the entire template a loop would be awkward and unpredictable in
this scenario.
If anything the bug is that the in-loop functions work outside the loop at
all. If they failed more consistently it would help avoid the confusion
caused by things like the_title working but not the content. I think
the_title() probably works because it is more likely to be used in the
header and other situations, so at some point it was given special powers to
inspect the singular title that the_content wasn't given.
--
Jeremy Clarke
Code and Design | globalvoicesonline.org
More information about the wp-hackers
mailing list