- This topic is empty.
November 7, 2009 at 11:51 pm #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 –Code:” rel=”bookmark” title=”Permanent Link to “>
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?November 8, 2009 at 12:04 am #66372
I just updated the code as seen below –
From this –Code:
To this –Code:
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.November 8, 2009 at 9:15 am #66377TeMcMember
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 postsCode:id=”post-“>November 8, 2009 at 9:18 pm #66384
Perfect! Exactly what I was after thank you.
- The forum ‘Back End’ is closed to new topics and replies.