[wp-trac] Re: [WordPress Trac] #4162: query_posts('p=<id>') =
always a full post
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 19 08:24:16 GMT 2007
#4162: query_posts('p=<id>') = always a full post
-----------------------+----------------------------------------------------
Reporter: devil1591 | Owner: anonymous
Type: defect | Status: reopened
Priority: high | Milestone: 2.2
Component: General | Version: 2.2
Severity: blocker | Resolution:
Keywords: |
-----------------------+----------------------------------------------------
Changes (by devil1591):
* status: closed => reopened
* resolution: invalid =>
* milestone: => 2.2
Comment:
Thanks, I know that query_posts alone doesn't show anything...
That code shows the full post
{{{
query_posts('p=1');
while (have_posts()) : the_post();
the_content('Read the full post »');
endwhile;
}}}
That one only shows the first part, as it should be, isn't it a bug ?
{{{
$q = new WP_query('p=1');
while ( $q->have_posts() ) : $q->the_post();
the_content('Read the full post »');
endwhile;
}}}
In fact, the problem seems to be in '''get_the_content''', because if you
set the global '''$more''' to 0 in the first case, you'll display only the
first part of the post BUT
if you set ''$more to 1'' in the second case, you'll also display the
first part.
--
Ticket URL: <http://trac.wordpress.org/ticket/4162#comment:2>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list