Some tries later, I found out that the Events Calendar page uses the global sidebar settings for blog pages. When I change this to the desired sidebar-content layout, the Events Calendar page looks fine (without right sidebar).
But by changing this, the sidebar of course disappears on my blog pages as well, where it should be the 3 column layout sidebar-content-sidebar.
Now I found a hint in the GeneratePress documentation, how to target different pages with individual layouts, for example:
add_filter( 'generate_sidebar_layout','tu_custom_category_sidebar_layout' );
function tu_custom_category_sidebar_layout( $layout )
{
// If we are on a category, set the sidebar
if ( is_category() )
return 'no-sidebar';
// Or else, set the regular layout
return $layout;
}
Question: How can I find out if we are on the calendar’s page? Knowing this, I could return the desired sidebar layout by adding a filter…
This would only be the second best solution, the best would still be to set up a custom page as the main calendar’s page, so I can specify the desired layout and additional content (header image and main content).
-
This reply was modified 9 years, 3 months ago by
Marc.