Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Cancel post geotargeting on certain pages
// cancel geotargeted posts on certain pages
add_filter('geot/cancel_posts_where', 'geotwp_cancel_geo' );
function geotwp_cancel_geo( $query ) {
// cancel for every page that is not search
if( ! is_page('search') ) {
return true;
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment