<?php
// retrieve one post with an ID of 5
query_posts('p=5');
global $more;
// set $more to 0 in order to only get the first part of the post
$more = 0;
// the Loop
while (have_posts()) : the_post();
// the content of the post
the_content('Read the full post »');
endwhile;
?>
The read more functionality with this query doesn't work as i use the code.Is it a bug?
I think that it is a bug, if you don't use query_posts(), then you get the more link but when you do, it returns the full post content. Please try the code below:
<?php
$my_post_id = 17;
$my_post = get_post( &$my_post_id );
if( $my_post ) {
setup_postdata( $my_post );
the_content('Read the full post »');
}
?>
Wow~Great code!Thank u very much!
gmisen
Member
Posted 6 months ago #
hey, i'm having the same problem
Where exactly do you put this code? in the functions file? or the start of the loop
and is it much different if my new query is calling all posts in a certain category instead of just one?