Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • #751791

    I have been struggling with adding a sidebar to Enfold pages using the Events Calendar Pro as “Layout” isn’t accesible with these types of pages inside the editor.

    On my live site here is the current main calendar and single events pages
    Main – http://www.itsgreektomemn.com/events/
    Single Event – http://www.itsgreektomemn.com/events/wine-wednesdays/2017-03-01/

    Here is what I want them to look like with a sidebar enabled
    Main – http://www.ponycorral.ca/featured-events/
    Single Event – http://www.ponycorral.ca/featured-event/karaoke-nights-nairn/2017-03-02/
    Mock Up On My Own Website – http://www.itsgreektomemn.com/test/

    Tried to update the sidebar.php with true statements this but it did not help

     if($custom_sidebar)
            {
                dynamic_sidebar($custom_sidebar);
                $default_sidebar = true;
            } elseif (is_singular('event')) {
    			 dynamic_sidebar('Sidebar Blog');
    			 $default_sidebar = true;
    		}

    I have a child theme set up but cant figure out which file/template I need to override to enable sidebars on events pages.

    Thanks in advance for your help,
    Jon

    #754182

    Hi Jon!

    Thank you for using Enfold.

    You need to modify the templates in the config-events-calendar > views folder.

    Cheers!
    Ismael

    #756211

    Through ftp I found the Views folder for the plugin under Enfold > Config-Events-Calendar > Views and modified the default-templates.php
    but just can’t seem to get it to add a side bar.

    Below is what I replaced the contents of the Views file with to call the Event sidebar but must be missing something

    <?php
    global $avia_config;
    
    	/*
    	 * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
    	 */
    	 get_header();
    		
    	 $title = tribe_is_month() ? __('Calendar of Events', 'avia_framework') : tribe_get_events_title(false);
     	 $args = array('title'=> $title, 'link'=>'');
    
     	 if( !is_singular() || get_post_meta(get_the_ID(), 'header', true) != 'no') echo avia_title($args);
     	 
     	 do_action( 'ava_after_main_title' );
     	 
    	 ?>
    
    		<div class='container_wrap container_wrap_first main_color fullsize'>
    
    			<div class='container'>
    
    				<main class='template-page template-event-page content av-content-small units' <?php avia_markup_helper(array('context' => 'content','post_type'=>'page'));?>>
    					
    					<?php	
                        //get the sidebar
    				//$avia_config['currently_viewing'] = 'page';
    				echo "<aside class='sidebar sidebar_right'>";
        				echo "<div class='inner_sidebar extralight-border'>";
    						dynamic_sidebar('Events');
    					echo "</div>";
    				echo "</div>";
                        ?>
                        
    					 <div id="tribe-events-pg-template">
                       
                     	<?php
                     	
    					tribe_events_before_html();
    					tribe_get_view();
    					tribe_events_after_html(); 
    										
    					?>
    					
    					</div> <!-- #tribe-events-pg-template -->
    					
    				<!--end content-->
    				</main>
                    
                    <?php 
    				
                    $avia_config['currently_viewing'] = "page";
    				//get the sidebar
    				//$avia_config['currently_viewing'] = 'page';
    				echo "<aside class='sidebar sidebar_right'>";
        				echo "<div class='inner_sidebar extralight-border'>";
    						dynamic_sidebar('Events');
    					echo "</div>";
    				echo "</div>";
    				
    				?>
    
    			</div><!--end container-->
    
    		</div><!-- close default .container_wrap element -->
    
    <?php get_footer(); ?>
    #756576

    I’ve also tried to edit the Enfold > Config-Events-Calendar > Views > single-events.php but couldnt get that to work either

    Instead I went a different route and disabled Enfold from overriding the Plugin with this and like magic I was able to use the Pages sidebar

    //remove Events Calendar override
    
    add_action('after_setup_theme', 'ava_disable_events_mod', 50);
    function ava_disable_events_mod() {
    	$tec = Tribe__Events__Pro__Main::instance();
    	
    	remove_action('wp_enqueue_scripts', 'avia_events_register_assets',15);
    	remove_action('tribe_events_template', 'avia_events_tempalte_paths', 10, 2);
    	remove_action('option_tribe_events_calendar_options', 'avia_events_perma_options', 10);
    	remove_action('tribe_general_settings_tab_fields', 'avia_events_general_tab', 10);
    	remove_action('tribe_display_settings_tab_fields', 'avia_events_display_tab', 10);
    	remove_action( 'tribe_events_cost_table', 'avia_events_upsell', 10);
    	remove_action( 'avia_post_nav_entries', 'avia_events_custom_post_nav', 10);
    	remove_filter('avia_breadcrumbs_trail','avia_events_breadcrumb');
    	remove_action( 'tribe_events_before_the_event_title', 'avia_events_content_wrap', 10);
    	remove_action( 'tribe_events_after_the_event_title', 'avia_events_open_outer_wrap', 10);
    	remove_action( 'tribe_events_after_the_meta', 'avia_events_open_inner_wrap', 10);
    	remove_action( 'tribe_events_after_the_content', 'avia_events_close_div', 1000);
    	remove_action( 'tribe_events_after_the_content', 'avia_events_close_div', 1001);
    	remove_action( 'tribe_events_after_the_content', 'avia_events_close_div', 1003);
    	remove_action( 'tribe_events_single_event_after_the_content', array( $tec, 'register_related_events_view' ) );
    }
    

    Will post an update on here once I have a chance ti style it and see if there are any issues.

    #756781

    Hey!

    I don’t think that’s a good idea because the plugin features might not work properly with the theme. If you want to add the sidebar in the single events page, just edit the template (single-event.php), look for this code at the very end of the file.

    </div><!-- #tribe-events-content -->
    

    Add the sidebar function below:

    <?php get_sidebar(); ?>
    

    And use this css code to adjust the width of the events container:

    #tribe-events-content {
        width: 70%;
        float: left;
    }

    Best regards,
    Ismael

    #756861

    Thanks Ismael.

    Had tried that method and just switched back to it, but am still having 3 small issues with it I can’t seem to fix.
    I have tried CSS and PHP edits but couldn’t fix these until I overrode Enfold to use the Plugin Defaults.

    1. How can I enable the sidebar on the main Events Page?
    http://www.itsgreektomemn.com/events/

    2. How can I remove the search bar on the main Events Page?

    3. How do I prevent the weird stacking that happens on the Past Events page?
    It seems to try to load the masonary containers before the images are loaded and sets them at 150px tall.
    After it loads and you refresh the page they load correctly, but the intial load is messed up.
    http://www.itsgreektomemn.com/events/?action=tribe_photo&tribe_paged=1&tribe_event_display=past

    Jon

    #757675

    Hey!

    1.) For the main events page, edit the default-template.php file. Look for this code:

    tribe_get_view();
    

    Add the sidebar function:

    get_sidebar();
    

    And this css code.

    #tribe-events-content-wrapper {
        width: 80%;
        float: left;
        padding-right: 50px;
    }

    2.) Please use this css code:

    .tribe-bar-search-filter {
        display: none;
    }

    3.) It looks fine on my end. Could you please provide a screenshot?

    Best regards,
    Ismael

    #758208

    Ismael,

    Thank you.

    1. That worked great, however, the CSS has a conflict I can’t figure out
    Both of these are required to get the side bar to show up on the Main Malendar page plus the Single Events pages and they do work individually, however, when I use both it looks weird and takes up 80% x 2 it seems.

    #top #tribe-events-pg-template {
        width: 80%;
        float: right;
        padding-left: 50px;
    }
    
    #tribe-events-content {
        width: 80%;
        float: right;
        padding-left: 50px;
    }

    2. Didn’t work to hide the search bar unfortunately even with !important; on the end

    3. Looks like it was fixed tonight by an update of the plugin to version 4.44 and was an issue on their end

    #758260

    Hey!

    1.) We revised the modification. Please try it again.

    // https://kriesi.at/support/topic/events-calendar-pro-adding-a-sidebar/#post-757675

    2.) Which search bar are you referring to? Please provide a screenshot.

    Regards,
    Ismael

    #758271

    Hello,

    1. That didn’t quite work either.
    It worked on the Main Calendar and Previous Event pages
    http://www.itsgreektomemn.com/events/

    but did not work for the Single Events pages
    http://www.itsgreektomemn.com/events/wine-wednesdays/2017-03-15/

    When I sub in #tribe-events-content it does the opposite and when I do both it gets messed up.

    2. Here is a screenshot. The CSS you provided got rid of the white box for Keyword Search, but I want to disable the entire horizontal Events Bar

    Thanks a ton,
    Jon

    #758773

    Hi!

    1.) That modification is only for the main events template, not the single events page. Retain the modification for the single events page.

    // https://kriesi.at/support/topic/events-calendar-pro-adding-a-sidebar/#post-756781

    2.) Please use this css code.

    div#tribe-events-bar {
        display: none;
    }

    Regards,
    Ismael

    #758955

    Thanks a ton, it is only the sidebar that is hung up still.
    I am not sure what you meant by “Retain the modification for the single events page.”

    When I use that code it adds the spacing and sidebar to the Main Calendar page, but adds no spacing or sidebar to the Single Events
    Single Event: http://www.itsgreektomemn.com/events/wine-wednesdays/2017-03-15/
    Main Page: http://www.itsgreektomemn.com/events/

    #tribe-events-content-wrapper {
        width: 80%;
        float: left;
        padding-right: 50px;
    }

    When I take off -wrapper from the code it adds the spacing and sidebar to the Single Events pages, but on the Main Calendar page is does only the spacing with no sidebar visible

    #tribe-events-content {
        width: 80%;
        float: left;
        padding-right: 50px;
    }

    If I use both in the CSS at the same time it add the sidebar to both, but really messes up the Main Calendar page alignment

    Thanks
    Jon

    #759262

    Hey!

    We provided two modifications, one for the single events page and one for the main events page. Please review the suggestions above.

    single events page:
    // https://kriesi.at/support/topic/events-calendar-pro-adding-a-sidebar/#post-756781

    main events page:
    // https://kriesi.at/support/topic/events-calendar-pro-adding-a-sidebar/#post-757675

    Regards,
    Ismael

    #759265

    Thanks, those do work great for each type of page by themselves
    However, when I apply the CSS for both the Main Events page & Single Events pages it mess with the container size on the Main Events

    I have included screenshots of the Main Events Page under all 3 conditions:

    With only Main Events CSS

    With only Single Events CSS

    With Main Events & Single Events CSS

    #759281

    Hi!

    I see. Please change the css modification.

    #tribe-events-content {
        width: 80%;
        float: right;
        padding-left: 50px;
    }

    .. to:

    .single-tribe_events #tribe-events-content {
        width: 80%;
        float: right;
        padding-left: 50px;
    }

    Cheers!
    Ismael

    #759296

    Ismael,

    That worked like magic!

    Thanks
    Jon

    #759543

    Hi Jon,

    Great, thanks for the feedback. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #760422

    I think I am good to go now, thanks for the help.

    If have have other related questions I will open a new thread.

    Jon

    #761107

    Okay Jon,

    Thanks for using Enfold :)

    Best regards,
    Nikko

Viewing 19 posts - 1 through 19 (of 19 total)
  • The topic ‘Events Calendar Pro Adding A Sidebar’ is closed to new replies.