Created
August 20, 2020 14:53
-
-
Save djrmom/89e2a8db18d6b3f6e524493c78e142e6 to your computer and use it in GitHub Desktop.
facetwp ignore sticky posts in blog archive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php add_filter( 'pre_get_posts', function( $query ) { | |
if ( $query->is_main_query() && is_home() ) { | |
$query->set( 'ignore_sticky_posts', true ); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment