Shortcode [tribe_events] not working – other shortcodes do work.

Home Forums Calendar Products Events Calendar PRO Shortcode [tribe_events] not working – other shortcodes do work.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1328163
    Amy Doughten
    Participant

    Hello! I am using Events Calendar + Events Calendar Pro.
    Environment = GeneratePress and Elementor as a pagebuilder.

    The pagebuilder has the ability to add shortcodes. When I add [tribe_mini_calendar], the calendar displays both in preview and “live.” It also works with [tribe_this_week]. However, when I use [tribe_events] it only shows in preview mode, not “live.” (https://www.whatsupucity.com/calendar/) **all 3 shortcodes are there, only two display*

    The shortcode [tribe_events] does on on a wordpress page that is not using the pagebuilder. (https://www.whatsupucity.com/test/)

    Any ideas? I’m at a complete loss. The calendar itself also displays as expected, but without the pageheader I’ve created on the interior pages and my .php skills are non existent, although I’m sure there’s a way to fix it that way (https://www.whatsupucity.com/events/)

    Thank you in advance.

    #1328748
    Amy Doughten
    Participant

    Not sure what the proper procedure is here – bumping this up for response. Thanks in advance.

    #1328768
    Barry
    Member

    Hi Amy,

    I’m really sorry you were kept waiting so long – but would love to help if I can. Some code like this should help:

    function reregister_tribe_events_shortcode( $atts ) {
    	$shortcode = new Tribe__Events__Pro__Shortcodes__Tribe_Events( $atts );
    	return $shortcode->output();
    }
    
    add_action( 'init', 'reregister_tribe_events_shortcode', 100 );

    This could be added either to a custom plugin (preferred) or else to your theme’s functions.php file.

    The problem it solves is that – by design – the [tribe_events] shortcode will only render once per page. Behind the scenes, though, we find that a lot of page builders effectively trigger the display of shortcodes and other things more than once (though the output is only used once), which can cause problems.

    I wanted to flag that because this code will also let you use [tribe_events] multiple times on the same page, however it is not designed for that and doing so may cause problems (in other words, use this solution with care!).

    #1339138
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Shortcode [tribe_events] not working – other shortcodes do work.’ is closed to new replies.