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
// Show title, excerpt and thumbnail in archives | |
add_action('pre_get_posts', 'my_pre_get_posts'); | |
function my_pre_get_posts() { | |
// If the user is looking at the front page | |
if ( is_archive() || is_category() || is_front_page() ) { | |
// Remove the Groups_Post_Access filters | |
remove_filter( 'posts_where', array( 'Groups_Post_Access', 'posts_where' ), 10, 2 ); | |
remove_filter( 'the_posts', array( 'Groups_Post_Access', 'the_posts' ), 1, 2 ); |