I have a post that shows the titles and excerpts from a specific category underneath the content. Currently this is coded into a specific template like this:
<?php query_posts('category_name=dogs&showposts=5'); if (have_posts()) : ?>
This is fine but I need the client to be able to handle this themselves from a generic template so that I don't need to create a new one each time a category is created.
I want the client to create a new post as normal but then use a custom field to pull in posts from a specified category underneath.
For displaying the category name I would use something like this (assume we have a custom field name of "featured" and a value of "dogs":
<?php echo get_post_meta($post->ID, 'featured', true); ?>
So what I am guessing I need to do is replace the category_name=dogs part of my first example with something that pulls in the meta info.
And that is where my knowledge ends. I know I can post one into the other but I don't know how to resolve it.
Pleeeeeeeeeeeeeeease help!
thanks
James
ps using wordpress 3.2.1 and a custom theme