WordPress.org

Ready to get started?Download WordPress

Forums

Pinboard
[resolved] Stickies appearing in main looop (1 post)

  1. indelible heff
    Member
    Posted 10 months ago #

    Hey chaps, you say that the stickies go into the slider, but not on the content of the homepage.

    I found this was not the case.

    I edited the main loop to this to achieve the functionality I was looking for:

    <?php $the_query = new WP_Query( array( 'post__not_in' => get_option( 'sticky_posts' ) ) ); ?>
    			<?php if ( $the_query->have_posts() ) :  ?>
    				<div class="entries">
    					<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    						<?php get_template_part( 'content', get_post_format() ); ?>
    					<?php endwhile; ?>
    				</div><!-- .entries -->
    				<?php pinboard_posts_nav(); ?>
    			<?php else : ?>
    				<?php pinboard_404(); ?>
    			<?php endif; ?>

    Hopefully this may help someone else havbing the same issue.

    Cheers team.

Reply

You must log in to post.

About this Theme

About this Topic

Tags