Tagged: event calendar pro, sidebars
-
AuthorPosts
-
July 17, 2015 at 6:02 pm #475094
I am trying to see where I can add a sidebar to my events and it will not apply. Is there something I need to add or change for this to work? I have set up the sidebar in my widgets but it does not give me the option anywhere to add a sidebar to Events.
Please advise,
thanks!July 19, 2015 at 3:26 pm #475391Hey cybervise13!
Thank you for using Enfold.
The events have no sidebar by default so you have to modify the default-template.php inside the config-events-calendar > views folder. Add the get_sidebar function. You can check the single.php file for reference.
Best regards,
IsmaelJuly 21, 2015 at 4:54 pm #476616I tried adding the sidebar but it seems to just break the page. Is it
<?php $avia_config['currently_viewing'] = "blog"; //get the sidebar get_sidebar(); ?>
We only need it to be on the single-event. I would like it to pull in a specific sidebar I created called events. Would I just replace “blog” with “events”. I understand there may be some styling tweaks that need to happen in order to get it to work but if I can get it to pull in correctly, that is a start.
Thanks!July 24, 2015 at 3:40 pm #478221Any word on this? We have other clients using and interested in using Enfold and Event Calendar Pro so knowing a sidebar is possible for the events pages would be helpful in our recommendation for themes and events combinations. Thanks so much!
July 28, 2015 at 6:17 am #479437Hi!
My bad. You have to modify the defaults-template.php file. Remove everything then replace it with this code: http://pastebin.com/rhtUtra6
Regards,
IsmaelJuly 28, 2015 at 8:05 pm #479891that is perfect! Thanks so much. One more question, is there a way to call a specific sidebar? I tried adding the name to the get sidebar function and it did not pull it in. I have a sidebar called Programs.
Much appreciated!July 30, 2015 at 6:45 am #480535Hi,
As far as I know that should work, maybe you did something wrong? Have a look at the documentation here: https://codex.wordpress.org/Function_Reference/get_sidebar
Best regards,
RikardJuly 30, 2015 at 3:53 pm #480751<?php $avia_config['currently_viewing'] = "page"; //get the sidebar get_sidebar ( 'Programs' ); ?>
This is the snippet. It does not pull in the Programs sidebar. I tried using dynamic_sidebar as well and it still did not pull in. I have looked at the codex and that seems to be the way to get it to pull in but it’s not. I would appreciate any assistance.
Thanks!July 30, 2015 at 3:55 pm #480752I should maybe clarify as well that this particular sidebar was added in the widgets using the Enfold Child Custom Widget Area. Does that change the way these needs to be called?
August 1, 2015 at 7:32 am #481644Hey!
Yes, you’re correct. Use the dynamic_sidebar function then create the sidebar container manually. Something like this: https://kriesi.at/support/topic/sidebar-issue-with-events-pages/#post-407489
//get the sidebar //$avia_config['currently_viewing'] = 'page'; echo "<aside class='sidebar sidebar_right'>"; echo "<div class='inner_sidebar extralight-border'>"; dynamic_sidebar('Programs'); echo "</div>"; echo "</div>";
Cheers!
IsmaelAugust 12, 2015 at 4:59 pm #486681Thanks, that seems to have done the trick!!
August 13, 2015 at 6:39 am #486946 -
AuthorPosts
- The topic ‘Add a sidebar to events using Modern Tribe Events Calendar Pro’ is closed to new replies.