Sorry, I also am wondering is it possible using the filter to hide the map and error message on other pages? I have the map in the leftside bar on my site (it’s an internal server, so I can’t provide links)
But if I add this to the theme functions.php
function bgmpShortcodeCalled()
{
global $post;
$shortcodePageSlugs = array(
'page-I-want-it-on',
'second-page-I-want-it-on'
);
if( $post )
if( in_array( $post->post_name, $shortcodePageSlugs ) )
add_filter( 'bgmp_map-shortcode-called', '__return_true' );
}
add_action( 'wp', 'bgmpShortcodeCalled' );
Would it then hide the error and map on the other pages, or would I see the error?