Support » Plugin: The Events Calendar » changing event page title breaks single event pages

Viewing 5 replies - 1 through 5 (of 5 total)
  • Brook

    (@brook-tribe)

    Howdy Torre,

    One thing that might not have been made clear in that tutorial is that you might need to remove the opening <?php tag. Usually in a theme’s functions .php file you have one <?php tag at the very top, and generally there is no closing tag. If you have multiple <?php tags in teh file white screens might happen!

    So in short if you are creating a new functions.php file paste that snippet inside and you should be good. If you are editting an existing one, paste that snippet at the top of the file, but replace the “<?php” tag that you will see at the top of the file with the <?php tag you see at the top of the snippet.

    Hopefully that makes sense. I edited the tutorial to make this a bit more clear. Cheers!

    – Brook

    Brook,

    Thank you, however that was not the issue. I was aware of the opening php tag rules, and only used one. Here is the code from my functions.php file.

    <?php //This is the functions.php file for the IWGA Divi Child Theme by Torre Kean
    // This file is loaded before and - in addition to - the parent theme's file
    
    add_filter('tribe_get_events_title', 'change_upcoming_events_title');
    
    function change_upcoming_events_title($title) {
    	//We'll change the title on upcoming and map views
    	if (tribe_is_upcoming() or tribe_is_map() or tribe_is_photo()) return 'Upcoming Parties';
    
    	//In all other circumstances, leave the original title in place
    	return $title;
    }
    
    // this function is allowing us to add breaks to menu nav titles with a pipe | character
    
    add_filter( 'the_title', 'wpa_105883_menu_title_markup', 10, 2 );
    
    function wpa_105883_menu_title_markup( $title, $id ){
        if ( is_nav_menu_item ( $id ) ){
            $title = str_ireplace( "|", "<br/>", $title );
        }
        return $title;
    }

    Using this code successfully changes the title of the page, but all event pages are blank/white.

    Thank you!
    Torre

    Brook

    (@brook-tribe)

    Only the event pages are white? That’s good to know. Usually when a white screen happens that means that an error is being surpressed. That is great on the one hand, hiding errors from the public. On the other hand it means that we have very little information to go on. Could you try enabling WP_DEBUG so that we can see the error? Sometimes folks also need to change the error_reporting value in their PHP.ini to E_ALL. But, that is rare.

    Once you have done that maybe the error message will shed more light here. Or, perhaps you have already done that and are still see a white screen. That would be odd, but please let me know if that’s the case. Thanks Torre!

    – Brook

    Was this issue ever resolved? I’m having the same problem and can’t seem to find any solution. TIA

    Plugin Author Barry

    (@barryhughes-1)

    Hi dharvey180,

    Could you follow Brook’s suggested troubleshooting steps (re enabling WP_DEBUG) and post the results in a new topic, linking back to this one?

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘changing event page title breaks single event pages’ is closed to new replies.