Add sidebar to Events Calendar page template

Community Forums Forums Design Tips and Tricks Add sidebar to Events Calendar page template

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  derekalvarez 1 year ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #61715

    derekalvarez
    Participant
    Post count: 47

    I’m using the Events Calendar Pro plugin with Going Green theme and I’m trying to add my sidebar to the page template they have. Here is the code I’m using…


    <?php
    /**
    * Default Events Template
    * This file is the basic wrapper template for all the views if 'Default Events Template'
    * is selected in Events -> Settings -> Template -> Events Template.
    *
    * Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php
    *
    * @package TribeEventsCalendar
    * @since 3.0
    * @author Modern Tribe Inc.
    *
    */

    if ( !defined('ABSPATH') ) { die('-1'); } ?>

    <?php get_header(); ?>
    <div id="tribe-events-pg-template">
    <?php tribe_events_before_html(); ?>
    <?php tribe_get_view(); ?>
    <?php tribe_events_after_html(); ?>
    </div> <!-- #tribe-events-pg-template -->

    </div>

    <div id="sidebar" class="widget-area">

    <?php genesis_sidebar() ?>

    </div>

    <?php get_footer(); ?>

    Where am I going wrong?

    http://test.epicmag.org/events/
    #61728

    braddalton
    Participant
    Post count: 9802

    You may be able to conditionally change the layout using PHP code but not sure as i would need to test it locally with the plugin installed.

    Can you link to the plugin download page please.


    #61729

    derekalvarez
    Participant
    Post count: 47

    Thanks, Brad. Here it is… http://wordpress.org/plugins/the-events-calendar/

    I’ve changed the code a bit and it added the sidebar, but now the sidebar isn’t aligning correctly…


    <?php
    /**
    * Default Events Template
    * This file is the basic wrapper template for all the views if 'Default Events Template'
    * is selected in Events -> Settings -> Template -> Events Template.
    *
    * Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php
    *
    * @package TribeEventsCalendar
    * @since 3.0
    * @author Modern Tribe Inc.
    *
    */

    if ( !defined('ABSPATH') ) { die('-1'); } ?>

    <?php get_header(); ?>
    <div id="content" class="content-sidebar-wrap">
    <div id="tribe-events-pg-template">
    <?php tribe_events_before_html(); ?>
    <?php tribe_get_view(); ?>
    <?php tribe_events_after_html(); ?>
    </div> <!-- #tribe-events-pg-template -->

    </div>

    <div id="sidebar" class="widget-area">

    <?php genesis_sidebar() ?>

    </div>

    <?php get_footer(); ?>

    #61750

    braddalton
    Participant
    Post count: 9802

    Can’t you display this calender using a shortcode or PHP tag and use one of the genesis layouts instead?


    #61752

    derekalvarez
    Participant
    Post count: 47

    I might go that way, but the styling doesn’t look as sharp when I tried it… I was figuring this way I’d have to change less code.

    #61810

    derekalvarez
    Participant
    Post count: 47

    I figured it out for anyone else who has this problem…


    <?php
    /**
    * Default Events Template
    * This file is the basic wrapper template for all the views if 'Default Events Template'
    * is selected in Events -> Settings -> Template -> Events Template.
    *
    * Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php
    *
    * @package TribeEventsCalendar
    * @since 3.0
    * @author Modern Tribe Inc.
    *
    */

    if ( !defined('ABSPATH') ) { die('-1'); } ?>

    <?php get_header(); ?>

    <div id="content-sidebar-wrap">

    <div id="content">
    <div id="tribe-events-pg-template">
    <?php tribe_events_before_html(); ?>
    <?php tribe_get_view(); ?>
    <?php tribe_events_after_html(); ?>
    </div> <!-- #tribe-events-pg-template -->
    </div>

    <div id="sidebar" class="sidebar widget-area">
    <?php genesis_sidebar() ?>
    </div>

    </div> <!-- #content-sidebar-wrap -->

    <?php get_footer(); ?>

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.