• I am trying to list a number of posts and use the <–more–> functionality to show only part of the post. However it keeps showing the entire post. I have the <–more–> tag in the content and call the content with the_content(‘Read Entry’);

    I have this working fine on another site. The only thing I can think of is that I am listing the posts on a separate page from the index.php. So I set up a ‘news’ template and within that I use query_posts(); to call the posts and then list them. Does the more function only work on the index page or the archives page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well, if you’re using <–more–>, that’s your problem right there. The tag is <!--more-->, HTML comment style. Have you been clicking the ‘More’ quicktag button in the edit screen, or have you been writing the tag in yourself?

    jonbuda, when you say a ‘news’ template, do you mean you have a “page” that you use to load that template. If so then WP will assume you are viewing a single page and thus show the the entire post as it should for a single page/post.

    So to overcome this you need to set the $more variable to false just before you call the_content() as follows:

    <?php $more = false; the_content('Read Entry'); ?>

    Wow! THanks, MattRead! I was having the same problem as jonbuda, and yours is the only suggestion that hit the nail on the head. I don’t think I would have EVER figured that out!
    Kathy

    That is a great tip Matt, I spent ages looking in the codex but it’s not there I don’t think!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘‘More’ functionality not working correctly’ is closed to new replies.