WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Read more doesn't work when displaying content of a specific post (3 posts)

  1. vk011
    Member
    Posted 11 months ago #

    I am trying to display content of one specific post by its id, and it works but it shows the WHOLE post regardless of the fact that there is "read more" link inserted in the post (if I just show all posts the read more link works, so that's not the issue).

    This is my code:

    <?php
    		query_posts('p=80');
    		while (have_posts()): the_post();
    		  //the_title();
    		   the_content('READ MORE');
    		endwhile;
    	?>

    Any ideas please?

  2. keesiemeijer
    moderator
    Posted 11 months ago #

    Try this: http://codex.wordpress.org/Function_Reference/the_content#Overriding_Archive.2FSingle_Page_Behavior

    <?php
    query_posts( 'p=80' );
    global $more;
    while ( have_posts() ): the_post();
    //the_title();
    	$more = 0;
    	the_content( 'READ MORE' );
    endwhile;
    ?>
  3. vk011
    Member
    Posted 11 months ago #

    Thank you!

Reply

You must log in to post.

About this Topic