Exclusive sidebar to show across all events

Home Forums Ticket Products Event Tickets Plus Exclusive sidebar to show across all events

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #200732
    peeblesmedia
    Participant

    We need to display ‘Page – Sidebar right’ with an exclusive sidebar ‘Events Sidebar’ – how can i get our Events Sidebar to show?

    #201332
    Barry
    Member

    Hi!

    I’m just going to move this from the Shopp Tickets forum to our Events Calendar PRO forum – but the thread’s URL should remain the same and if you chose to subscribe to updates by email you should continue to receive them 🙂

    We need to display ‘Page – Sidebar right’ with an exclusive sidebar ‘Events Sidebar’ – how can i get our Events Sidebar to show?

    So there are a few ways you might add a specific sidebar to event pages. If you can’t do this simply by selecting an appropriate template via the Events → Settings → Display admin screen then it may be that choosing the Default Event Template and then overriding and customizing default-template.php is the way to go.

    Our Themer’s Guide covers many of the basics here – but the best way of actually adding the sidebar will vary from theme to theme. In some cases you might just drop in a line of code like this:

    <?php get_sidebar(); >?

    In others it might be something more like:

    `<?php dynamic_sidebar( ‘Sidebar Name’ ); ?>

    You may also need to “wrap” those statements in additional HTML in order to make the appearance of the sidebars really jive with your theme (and/or add some extra CSS).

    Does that help?

    #222915
    peeblesmedia
    Participant

    This reply is private.

    #223820
    Barry
    Member

    Hi!

    If possible, please don’t use private replies unless you have something confidential to share, like login credentials. Keeping things open just makes it easier for other customers in the same boat to research threads like this one in the future 🙂

    Also, due to some limitations in our current forum software, it is often best to share code via Pastebin, Gist or some other suitable service.

    <?php get_sidebar(Events-Sidebar); ?>

    It looks like you are missing quotes here (unless that is a result of our forum inadvertently stripping stuff out from the code you posted). Can you try:

    <?php get_sidebar(‘Events-Sidebar’); ?>

    Otherwise it will look to PHP as if you are subtracting the value of one constant (Sidebar) from another (Events). I hope that helps 🙂

    #228933
    peeblesmedia
    Participant

    I tried that code with and without the sidebar name and neither the ‘Events Sidebar or the default sidebar showed up.

    #229487
    Barry
    Member

    I’m sorry to hear that. One of the reasons this is tricky is that every theme is different and what works for one may not work for another (some “theme frameworks” may work in a quite different manner altogether, for instance).

    Are you certain your template override is being used, though? If you add something like:

    <h1> Hello!! </h1>

    Is that showing up? If so, what’s inside your theme’s sidebar.php template (does it in fact have one)? And did you register a new sidebar with the name Events-Sidebar – if so, can you share the code you used?

    #231068
    peeblesmedia
    Participant

    Thanks for prompt response. The template override isn’t working. The ‘Hello!!’ is showing up in the main default-template here: http://www.homesandinteriorsscotland.com/events/
    Sidebar showing below page as opposed to right hand side, it’s showing the default sidebar as opposed to the one ‘Events Sidebar’.
    I don’t create any php code for the ‘Events Sidebar. The sidebar is located within Appearance > Widgets and it’s called ‘Events Sidebar’. (The theme I use creates exclusive sidebars which you can select when you create a post/page.)
    Code on the default-template.php :
    <?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’); }

    get_header(); ?>
    <div id=”tribe-events-pg-template”>
    <?php tribe_events_before_html(); ?>
    <?php tribe_get_view(); ?>
    <?php tribe_events_after_html(); ?>
    <h1> Hello!! </h1>
    </div> <!– #tribe-events-pg-template –>
    <?php get_sidebar(EventsSidebar); ?>
    <?php get_footer(); ?>

    <?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’); }

    get_header(); ?>
    <div id=”tribe-events-pg-template”>
    <?php tribe_events_before_html(); ?>
    <?php tribe_get_view(); ?>
    <?php tribe_events_after_html(); ?>
    <h1> Hello!! </h1>
    </div> <!– #tribe-events-pg-template –>
    <?php get_sidebar(Events); ?>
    <?php get_footer(); ?>

    #232429
    Barry
    Member

    I think, unfortunately, we’ll have to bow out here (as this is ultimately a customization/theming issue). What you want to achieve is absolutely possible – but it does require some knowledge of WordPress and how sidebars work and really we’re going to have to leave you to delve into that. The following resources could be useful:

    Good luck 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Exclusive sidebar to show across all events’ is closed to new replies.