How to add a sidebar in Genesis for the events?

Home Forums Calendar Products Events Calendar PRO How to add a sidebar in Genesis for the events?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #118699
    suzannegoodwin
    Participant

    I tried with a demo custom post type and it works but not when the plugin generates the CPT

    #119054
    Barry
    Member

    Hi Suzanne,

    Can you provide a little more detail – what did you try with a demo CPT that doesn’t work with our own CPT? Is using the Default Events Template and adding a dynamic_sidebar() call not viable here?

    Let us know!

    #119115
    suzannegoodwin
    Participant

    Hi Barry
    // Register new sidebar
    genesis_register_sidebar( array(
    ‘id’ => ‘event-sidebar’,
    ‘name’ => ‘Events Sidebar’,
    ‘description’ => ‘This is the sidebar for events.’,
    ) );

    add_action(‘get_header’,’custom_events_sidebar’);
    function custom_events_sidebar'() {
    if ( is_singular(‘event’) {
    add_action( ‘genesis_sidebar’, ‘events_do_sidebar’ );
    }
    }

    function events_do_sidebar() {
    dynamic_sidebar( ‘event-sidebar’ );
    }

    This works with a hand coded CPT but not with the CPT your plugin generates.
    Do you have any working examples of your template which includes a sidebar?

    #119758
    Barry
    Member

    Right, so we can’t offer much Genesis-specific support here, but what I was proposing was that you use the Default Events Template and simply add a call to pull in the sidebar from there. Does that help?

    (Please do check out the Themer’s Guide if you haven’t already done so to see how template overrides work with The Events Calendar).

    #120143
    suzannegoodwin
    Participant

    Understand however that doesn’t really solve the problem. Do you have a shortcode that can be added to the editor so it uses the themes template?

    Adding the sidebar PHP still requires a significant amount of CSS.

    #120660
    Barry
    Member

    I’m unsure why that doesn’t solve the problem – it may be you need to write additional CSS but that is often true when achieving really tight integration with another theme. To answer your other questions we don’t have shortcodes that can be used to arbitrarily add views to pages/posts at this time, I’m afraid, but please do add your support to one of the suitable existing requests along those lines on UserVoice, it’s certainly something we’re considering.

    I’m really not sure there is much else we can offer you on this one – there probably are a number of alternate ways to tackle the problem but we’d need to leave you to figure out the details.

    With that in mind, I am inclined to close this thread unless you have any other questions on this topic?

    #126691
    Barry
    Member

    This thread’s not seen much activity for the last couple of weeks so I’ll go ahead and close it. Of course if you still need help with this or any other issue please don’t hesitate to create a new thread (or threads) and one of the team will be only too happy to help. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘How to add a sidebar in Genesis for the events?’ is closed to new replies.