Calendar sidebar on events pages without using template (Genesis)

Home Forums Calendar Products Events Calendar PRO Calendar sidebar on events pages without using template (Genesis)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #944161
    Simon
    Participant

    Hi,

    Love the plugin, but I’m not a great fan of template files.
    I want to put a mini calendar in the sidebar of all event pages.
    In Genesis functions.php + Event Rocket I had some success with:

    add_action('wp_head','events_page');
    function events_page() {
    	if ( tribe_is_event()) {
    		add_action( 'genesis_before_footer', 'event_sidebar' );
    		function event_sidebar() {
    			dynamic_sidebar('calendar');	
    		}
    	}
    }

    But it will require some styling and feels a bit messy and non-standard.

    I’d like to know if you have the quick answer for enabling a sidebar on event pages.
    (seems unlikely since it doesn’t follow standard Genesis hooks, so..)
    – or –
    The function for outputting the event page, so I can use it in a Genesis template.

    Many thanks

    #944378
    Simon
    Participant

    I eventually did it with a template. In case anyone else asks, when using Genesis, a better default-template.php is as follows:

    <?php
    if ( ! defined( 'ABSPATH' ) ) {
    	die( '-1' );
    }
    
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
    
    remove_action( 'genesis_loop', 'genesis_do_loop' );
    add_action('genesis_loop','genesis_tribe');
    function genesis_tribe() { ?>
    	<div id="tribe-events-pg-template"><?php
    		tribe_events_before_html();
    		tribe_get_view();
    		tribe_events_after_html(); ?>
    	</div><?php
    }
    genesis();
    ?>
    #944404
    Gustavo Bordoni
    Keymaster

    Hi Simon,

    Thanks for reaching out to us and then posting the correct answer, it helps a lot.

    Sorry for not been able to solve the issue for you sooner, but I’m very glad that you were able to solve it.

    I’m marking your answer as the correct one and closing the topic.

    My Best Regards,

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Calendar sidebar on events pages without using template (Genesis)’ is closed to new replies.