I am having alot of trouble with this. I was using <?php query_posts( array( 'post__not_in' => get_option( 'sticky_posts' ), 'paged' => get_query_var( 'paged' ) ) ); ?>
to exclude the posts from the main query on the my homepage because stickies are being used in the slider. I am making this theme for wordpress.org and I was told that was not recommended. I then tried adding this to my functions.php but to no avail:
/**
* Excluding sticky posts from home page. Sticky posts are in a slider.
*
* @since 0.1
*/
function essential_exclude_sticky( $query ) {
/* Exclude if is home and is main query. */
if ( is_home() && $query->is_main_query() )
$query->set( 'ignore_sticky_posts', true );
}
`
Any idea on what I am doing wrong?