I want to make my front page show a single feature story above the normal stories that show as excerpts. The feature stories will be from one category called 'feature' to identify them.
Any help please?
I want to make my front page show a single feature story above the normal stories that show as excerpts. The feature stories will be from one category called 'feature' to identify them.
Any help please?
I don't know how to do that.. though it sounds nice.. but as an alternative, you could use the AWSOM News Announcment plugin, that would put a story at the top of your posts.. and keep it there. You just wouldn't be able to assign a category to it. ...Maybe a short-term workaround...
I'm not sure if you want the whole article to appear but if so use this code:
<?php $the_query = new WP_Query('category_name=feature&showposts=1&orderby=post_date&order=desc'); while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID; ?>
<p><?php echo strip_tags(get_the_content(), '<a>'); ?></p>
<?php endwhile; ?>Thanks for your help guys ... jaclyn's code snippet does the job pretty well. Thanks! ('_')
This topic has been closed to new replies.