Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #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!

    #475391

    Hey 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,
    Ismael

    #476616

    I 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!

    #478221

    Any 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!

    #479437

    Hi!

    My bad. You have to modify the defaults-template.php file. Remove everything then replace it with this code: http://pastebin.com/rhtUtra6

    Regards,
    Ismael

    #479891

    that 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!

    #480535

    Hi,

    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,
    Rikard

    #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!

    #480752

    I 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?

    #481644

    Hey!

    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!
    Ismael

    #486681

    Thanks, that seems to have done the trick!!

    #486946

    Hi!

    Great! Glad we could help. :)

    Regards,
    Ismael

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Add a sidebar to events using Modern Tribe Events Calendar Pro’ is closed to new replies.