Tagged: ,

Viewing 21 posts - 1 through 21 (of 21 total)
  • Author
    Posts
  • #399040

    Hi there,

    Please see the events page on the development site at http://wordpress.shamajo.nl/evenementen/.

    We installed the plugin Events Manager (free version) and on the overall page everything works fine. We set a sidebar specifically for events and on this page it looks like it should.

    In the Events Manager plugin we set the events to be shown as (sub)pages. We like to see the same sidebar on the single events pages like the one for the events page, but it doesn’t. Strangely enough the url/permalink is correct (ie. http://wordpress.shamajo.nl/evenementen/shamajo-fair-ede-2015/), but in respect to the sidebar the page seems not to be considered as a subpage of the events page…

    We can’t figure out how to do that! Can you help us please?

    Thanks & regards,
    Monique

    #399175

    Hey MoniqueMartens!

    I’m sorry but I am having trouble understanding. It sounds like this plugin is creating a new post type named events and your wanting to change the sidebar for these posts?

    If so then try this out, https://kriesi.at/support/topic/overriding-functions-in-a-child-theme/#post-167093, and change “mycpt” with the slug of your event post type. This will add all of our post settings to the events so you can change the sidebar, etc etc.

    Regards,
    Elliott

    #399537

    Thanks Elliott for your reply!

    Isn’t the (Avia) Layout Builder meant to be only for the content of a page? In that case I assume this is not what I (my client!) wanted.

    When you look at a single events page, you can see that the right sidebar now shows the standard theme’s sidebar for pages (pages, categories and archive). We would like to present here the same sidebar as we’ve created (in widgets) for the overall events page (calendar, planned events and some text widgets).

    Does this makes sense to you?

    Regards,
    Monique

    #399982

    Hi!

    in the backend when you edit your single event page scroll down and look for “Layout” on the right side. There you will find “Sidebar Settings”. Choose the one you need. If it’s not there, you need to go first to Appearance->Widgets and create the sidebar you want.

    Best regards,
    Andy

    #400563

    Hi Andy,

    Thanks for your feedback.

    The thing is, I have created the sidebar, but there is no option in wp admin for events to choose a sidebar!

    Would it help if I submit login details, so you can have a look in wp admin yourself?

    Best regards,
    Monique

    PS: I indicated to receive emails for this topic, but I don’t receive any… :-(

    #401006

    Hey!

    You need to do what I suggested in my previous post. If I remember right the slug for the events is “tribe_events”. So the code would look like this.

        add_filter('avf_builder_boxes', 'avia_register_meta_boxes', 10, 1); //Add meta boxes to custom post types
        function avia_register_meta_boxes($boxes)
        {
            if(!empty($boxes))
            {
                foreach($boxes as $key => $box)
                {
                        $boxes[$key]['page'][] = 'tribe_events';
                }
            }
            return $boxes;
        }

    Best regards,
    Elliott

    • This reply was modified 9 years, 8 months ago by Elliott.
    #403308

    Thanks Elliott.

    I try that and keep you posted.

    Cheers,
    Monique

    #403824

    Hey Monique!

    Did you have any luck with the code Elliott provided?

    Cheers!
    Rikard

    #405079
    This reply has been marked as private.
    #405647

    Hi!

    Unfortunately, we don’t provide support for third party plugins. Additionally, the Events Manager Plugin is not ully compatible with the theme so you might encounter issues in the future that we can’t help you with. Please use the The Events Calendar plugin instead. Anyway, there is no connection between the plugin’s subpages option and the theme’s sidebar settings so you can’t expect the single events pages to show the main events page custom sidebar. If you want the single events page to show the same sidebar as the main events page, edit sidebar.php, look for this code:

    if($custom_sidebar)
            {
                dynamic_sidebar($custom_sidebar);
                $default_sidebar = false;
            }

    Replace it with:

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

    Change the index or name of the custom widget area “Sidebar Pages” to the name of the custom sidebar set under the main events page Sidebar Setting.

    Best regards,
    Ismael

    #406905

    Hi Ismael,

    Before changing to another plugin, with the corresponding extra work, can we look at the following.

    From page.php I have created a page called single-event.php. On this page I have placed “A bit of test text” both in main and in the sidebar. When you now look at a single events page, you can see that this text is visible in both the main content section and in the right sidebar. And it does not influence a standard page elsewhere on the site. So the template single-event.php works!

    Can I draw the conclusion that the only thing we need to change is the following code:

    	//get the sidebar
    	$avia_config['currently_viewing'] = 'page';
    	get_sidebar();
    
    	?>
    

    Can you let me know if this can be made to work? I promise that next time with Enfold I will use Events Calendar ;-)

    Regards,
    Monique

    • This reply was modified 9 years, 8 months ago by Monique.
    #407489

    Hey!

    Yes, that will work. Change it to:

    //get the sidebar
    				$avia_config['currently_viewing'] = 'page';
    				echo "<aside class='sidebar sidebar_right'>";
        				echo "<div class='inner_sidebar extralight-border'>";
    						dynamic_sidebar('Sidebar Pages');
    					echo "</div>";
    				echo "</div>";

    Adjust the name of the dynamic_sidebar to the custom sidebar of the main events page. This means that you will not able to control the single events pages sidebar in the backend.

    Best regards,
    Ismael

    #407960

    Hi Ismael,

    We are almost there :-)

    On large screens the sidebar is shown. However, somehow we lost the

    .inner-sidebar {
    margin-left: 50px;
    }

    Further on mobile version the sidebar is not yet show. And it seems that the footer sidebars are messed up on mobile version.

    Any more suggestions?

    Best regards,
    Monique

    #408669

    Hi!

    I’m sorry about that. There’s a missing apostrophe on the code above. We updated the code. Enable the Sidebar on Smartphones setting on Enfold > Sidebar Settings panel to enable the sidebar on mobile.

    Regards,
    Ismael

    #408779

    Hi Ismael,

    Sidebar is working fine now on large screens! Pfffff ;-)

    On mobile (below 768px) however not yet. In Enfold setting I had sidebar on mobile enabled, unchecked it and checked it again, but still no success…

    Regards,
    Monique

    #409665

    Hi!

    Add this to the Quick CSS field:

    @media only screen and (max-width: 767px) {
    .responsive #top #main .sidebar {
      display: block;
    }}

    Cheers!
    Ismael

    #410612

    Hi Ismael,

    Thanks so much again. It’s a tough cookie this one ;-)

    Now I can see the sidebar on mobile, but the perfectionist I am wants to get rid of the left border and left margin of that sidebar on mobile view. The left margin I could get rid of by changing your code to:

    @media only screen and (max-width: 767px) {
    .responsive #top #main .sidebar {
        display: block;
    }
    .inner_sidebar {
        margin-left: 0px;
    }
    }

    However, whatever I try to get rid of the border of .sidebar, it doesn’t work. In most cases, when I achieve to loose the border, I also loose the sidebar again :-(

    Regards,
    Monique

    #410861

    Hi Monique!

    Try replacing this:

    .responsive #top #main .sidebar {
        display: block;
    }

    with this:

    .responsive #top #main .sidebar {
        display: block;
        border-left-width: 0px !important;
    }

    Regards,
    Rikard

    #410996

    Hi Rikard,

    When I do this the whole sidebar is not visible anymore on mobile.

    I left your advised code intact in CSS, so you can check for yourself at ie. http://wordpress.shamajo.nl/evenementen/shamajo-cruise/.

    Regards,
    Monique

    #411449

    Hey!

    Please use this:

    .responsive #top #main .sidebar {
      display: block;
      overflow: visible;
      border-left: 0;
    }

    Place it inside the media query.

    Best regards,
    Ismael

    #412010

    Hey Ismael,

    Yes, it works!!

    Big thumbs up for your help to get this to work!! Thank you so much :-*

    Have a nice day,
    Monique

Viewing 21 posts - 1 through 21 (of 21 total)
  • The topic ‘Sidebar issue with events pages.’ is closed to new replies.