Hi … noob hoping for help here. I’ve been struggling with this for a bit, and figured I’d throw in the towel and just ask.
I’m trying to make a simple “featured posts” section using sticky posts. I found what seemed like a good tutorial (http://www.ilovecolors.com.ar/featured-posts-slider-wordpress/), which worked well enough (I dropped the second half as I’m not interested in the slider, I just want the posts).
But … that the sticky posts remain on top of the page as well as in the featured posts section. How can I “unstick” the posts in the loop so they appear in their normal place? Code is below (I’ve updated the now deprecated ‘caller_get_posts’ from the original source to ‘ignore_sticky_posts’, btw):
<h2>Featured</h2> <?php $loop = new WP_Query( array( 'showposts' => 4, 'post__in' => get_option('sticky_posts'), 'ignore_sticky_posts' => 1 ) ); while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php the_post_thumbnail( 'uthevet-image' ); ?> <h2>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></h2> <?php endwhile; ?>
[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
followed by the regular loop.
Thanks in advance for any help.
- The topic ‘Sticky / featured posts’ is closed to new replies.