The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End [Solved] Need Help with the WordPress <!–more–> Tag

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #26697

    I am developing a custom wordpress site to house my art. I have created a page called "Art" which aims to display all posts that have been posted to the "art" category. I have done this by creating a custom template, then I copied code from the homepage of my site (which displays posts from another category). I then edited the code as seen below –


    ” rel=”bookmark” title=”Permanent Link to “>


    ‘); ?>

    Not Found

    Sorry, but you are looking for something that isn’t here.

    For each post I make to the "art" category I have used the <!–more–> tag. I did this because I want the Art page to only display snippets of each post (a thumbnail and paragraph or 2 of text), then the visitor can click to see each full post separately which will have a large image to see. However the issue I’m finding is wordpress is ignoring the <!–more–> tag and outputting all content from the post.

    Does anyone have any idea how to get wordpress to start displaying posts on this Art page as I intended?


    I just updated the code as seen below –

    From this –


    To this –


    and it kind of works, it correctly outputs text from the <!–more–> tag but didn’t output the thumbnail image that I also included before the <!–more–> tag.


    Using the excerpt is one way of doing it, but may not give you the behaviour you want.

    Since you’re not on the actuall blog-home, category, archive or search page, the_contents() doesn’t know it’s supposed to give you only content up untill the <!–more–> -tag.

    To tell WordPress this do a global $more; after the query_posts(); and then "$more=0;" somewhere.
    Read also here !! (WP Codex / query_posts#More-tag


    * All posts of category with ID of 2
    * show 5 most recent posts




    Perfect! Exactly what I was after thank you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Back End’ is closed to new topics and replies.