WordPress.org

Ready to get started?Download WordPress

Forums

How to make front page show a feature story (4 posts)

  1. houseofstrauss
    Member
    Posted 5 years ago #

    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?

  2. wolfdogg
    Member
    Posted 5 years ago #

    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...

  3. jaclynmarie1
    Member
    Posted 5 years ago #

    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; ?>
  4. houseofstrauss
    Member
    Posted 5 years ago #

    Thanks for your help guys ... jaclyn's code snippet does the job pretty well. Thanks! ('_')

Topic Closed

This topic has been closed to new replies.

About this Topic