Home › Forums › Calendar Products › Events Calendar PRO › How to add a sidebar in Genesis for the events?
- This topic has 6 replies, 2 voices, and was last updated 10 years, 1 month ago by Barry.
-
AuthorPosts
-
March 14, 2014 at 7:01 am #118699suzannegoodwinParticipant
I tried with a demo custom post type and it works but not when the plugin generates the CPT
March 14, 2014 at 4:09 pm #119054BarryMemberHi 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!
March 14, 2014 at 11:26 pm #119115suzannegoodwinParticipantHi 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?March 17, 2014 at 8:55 am #119758BarryMemberRight, 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).
March 17, 2014 at 3:09 pm #120143suzannegoodwinParticipantUnderstand 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.
March 18, 2014 at 10:02 am #120660BarryMemberI’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?
April 2, 2014 at 5:57 am #126691BarryMemberThis 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!
-
AuthorPosts
- The topic ‘How to add a sidebar in Genesis for the events?’ is closed to new replies.