Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Ignore archive query when using a shortcode template
<?php
// Add to your (child) theme's functions.php
add_filter( 'facetwp_is_main_query', function( $is_main_query, $query ) {
return ( $query->is_post_type_archive( 'petite_annonce' ) ) ? false : $is_main_query;
}, 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.