WordPress.org

Ready to get started?Download WordPress

Forums

Sticky Post at top, Certain Categories only - on front page (3 posts)

  1. JenRed
    Member
    Posted 1 year ago #

    I am stuck and hoping someone will help work this out with me.

    I have a child theme of twentyeleven. The front page is set up with the latest posts, but only from 3 of the categories.

    I used this:

    <?php /* Start the Loop */ ?>
    <?php $query = new WP_Query( 'cat=6,8,11' ); ?>
    
    <?php while ( $query->have_posts() ) : $query->the_post(); ?>

    When a post is marked at "Sticky" it has a small "FEATURED" above it, but it stays within the listing, by date - I want it to jump to the top of the recent posts listed.

    I have tried a stack of things but the best I can do is to have the sticky post only, and the full post, not the excerpt as I want it.

    Can someone please help?

  2. JenRed
    Member
    Posted 1 year ago #

    So if a sticky post exists, the excerpt of it jumps to the top of the listing. Otherwise just display excerpts of recent posts in order as usual.

  3. JenRed
    Member
    Posted 1 year ago #

    Please can anyone help out with this?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.