$display is a WP variable. What page are you on when you get the notice? What version of WP are you using?
That’s why I am puzzled… I only get it when clicking a tag on our “Tag Map” page.
I’ll create another tag map, and see if it persists. WP 4.5.3.
Well you would as on line 136 of mctagmap.php, $display is being checked for. I don’t think it ever tossed an error that’s why I asked what version of WP you are using.
I am just getting around to fixing this bug (with our site).
I’ve resolved the error by inserting global $display; into the function. Obviously I need to make the change again if you update the plugin.
I’m having the same problem. @bradoliver could you possibly guide me on how you resolved it? Would appreciate so much.
I added “global $display;” to the function in mctagmap.php. See line 4 below, which is line 124 in the php file.
// overwrite single_tag_title()
add_filter('single_tag_title', 'mctagmap_single_tag_title', 1, 2);
function mctagmap_single_tag_title($prefix = '') {
global $display;
global $wp_query;
if ( !is_tag() )
return;
$tag = $wp_query->get_queried_object();
if ( ! $tag )
return;
$my_tag_name = str_replace('|', '', $tag->name);
if ( !empty($my_tag_name) ) {
if ( $display )
echo $prefix . $my_tag_name;
else
return $my_tag_name;
}
}
-
This reply was modified 9 years, 1 month ago by
bradoliver.