Ready to get started?Download WordPress


query_posts() disables "<!--more-->" functionality (4 posts)

  1. RobertB
    Posted 7 years ago #

    Hi all,

    I've looked around on the forums for a bit but couldn't find an answer to the question I have, so here goes:

    Beside the main template for my site I have a second template that's exactly the same, a copy of the main index template except for this line:

    <?php query_posts('cat=37'); ?>

    When I use the <!--more--> tag within an item on the main page it works fine. When using it on the second page it doesn't seem to have any effect though.

    I've tried removing the query_post call and this fixes the problem. However this is not an option since this is the whole point of my second template (it acts like a filter).

    I'm showing my items in both templates using:
    <?php the_content("Continue reading " . the_title('', '', false)); ?>

    Is there anyone that has a solution to this problem or can point me in the right direction here? Is this a known bug?

    Thank you all in advance.

    Best regards,


  2. RobertB
    Posted 7 years ago #

    Anyone please? I'm still busy trying to get it working. I'm sure of you experts knows the answer.

    Thank you all in advance.

    Best regards,


  3. minute44
    Posted 7 years ago #

    I assume, by "both" you mean category.php and index.php? Have you looked in archive.php as well?

    I had some trouble getting mine to work as well. The code in my category.php is as follows:

    <div class="thecontent">
      <?php the_content("continue reading " . get_the_title('', '', false)); ?>

    That makes the link text "Continue reading [post title]"

    Hope this helps.


  4. phejster
    Posted 6 years ago #

    I just posted about this problem in another thread - the answer is right here - http://wordpress.org/support/topic/175681?replies=2#post-790202

Topic Closed

This topic has been closed to new replies.

About this Topic