Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author tugbucket

    (@tugbucket)

    $display is a WP variable. What page are you on when you get the notice? What version of WP are you using?

    Thread Starter bradoliver

    (@bradoliver)

    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.

    Plugin Author tugbucket

    (@tugbucket)

    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.

    Thread Starter bradoliver

    (@bradoliver)

    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.

    Thread Starter bradoliver

    (@bradoliver)

    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 7 years, 11 months ago by bradoliver.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Undefined variable: display in mctagmap.php’ is closed to new replies.