• Resolved Blunderdog

    (@blunderdog)


    Using TEC v 3.9.3
    https://scenicstage.com/live/?post_type=tribe_events

    I just updated the functions.php in my themes folder to change “Upcoming Events” to something else. The code I used is

    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 Auditions';
    
        //In all other circumstances, leave the original title in place
        return $title;
    }

    Before I did this everything worked fine. Now when you click on the event’s “Find out more” it goes to a blank page. HELP!

    https://www.ads-software.com/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Blunderdog,

    Can you try using pretty permalinks to see if that makes a difference? If it does, great! If not, then it’s possible that the snippet needs to be modified to fit the format of your functions.php file.

    Let’s start there. ??

    Cheers!
    Geoff

    Thread Starter Blunderdog

    (@blunderdog)

    Ok… well, I changed the settings>permalinks from default to post name. That didn’t solve it. If it helps, I’m using the evolve theme, which has code in the functions.php file. The full code is:

    <?php
    
    $evolve_themename = "evolve";
    
    if ( get_stylesheet_directory() == get_template_directory() ) {
    	define('EVOLVE_URL', get_template_directory() . '/library/functions/');
    	define('EVOLVE_DIRECTORY', get_template_directory_uri() . '/library/functions/');
    } else {
    	define('EVOLVE_URL', get_template_directory() . '/library/functions/');
    	define('EVOLVE_DIRECTORY', get_template_directory_uri() . '/library/functions/');
    }
    
    get_template_part( 'library/functions/options-framework' );
    get_template_part( 'library/functions/basic-functions' );
    get_template_part( 'library/functions/options' );
    
    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 Auditions';
    
        //In all other circumstances, leave the original title in place
        return $title;
    }
    
    ?>

    The issue is in this file, when I remove the code involving the Events Calendar, it goes back to functioning normally. I really would like to have the title changed, so if this could be resolved that would be awesome. I really love this plugin!!

    Hmm, that is certainly strange. I tried the same snippet and it seemed to work in default Twenty Fifteen. Perhaps try putting the snippet outside the PHP wrapper of the theme functions and wrap it in its own:

    <?php
    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 Auditions';
    
        //In all other circumstances, leave the original title in place
        return $title;
    }
    ?>
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Clicking event goes to blank page’ is closed to new replies.