Archived topic
Problem with Events Calendar
15 replies · Started by Gustavo on May 21, 2015
Hello,
The background of the events (the events calendar) page has changed when I activated ons.
Now that is hidden.
What should I do to get back to being white?
http://gustavosamorano.com/estilodevida/agenda/
Thanks!
Hi there,
This thread may help: http://generatepress.com/forums/topic/generatepress-and-the-events-calendar/
Let me know :)
Hi there,
Is there a simple solution to solve the problem of calendar background and the menu?
I read all this thread and continue without seeing the solution ...
http://gustavosamorano.com/estilodevida/agenda/
Sorry for not getting back to you sooner - different time zones :)
Go to "Events > Settings > Display" and choose "Default Page Template" under the "Events Template".
Hi there,
1: The option you indicate shows the sidebar.
2: On the menu shows the active blog section instead calendar.
If you don't want a sidebar with it, set it back to "Default Events Template".
Then add this CSS:
.tribe-events-page-template .site-content {
background: #ffffff;
margin: 40px 0;
padding: 40px;
}
Adjust the margin value to your "Separating space" you have set.
Adjust the padding to whatever content padding you have set.
As for the plugin highlighting the Blog menu item, try this function:
add_filter('nav_menu_css_class', 'generate_te_active_menu', 400);
function generate_te_active_menu($menu) {
$post_type = get_post_type();
switch($post_type) {
case 'tribe_events':
$menu = str_replace('current-menu-item', '', $menu);
$menu = str_replace('current_page_item', '', $menu);
break;
}
return $menu;
}
How to add PHP: http://generatepress.com/knowledgebase/adding-php-functions/
Hi Tom,
In functions.php only I see this:
<?php
/**
* Generate child theme functions and definitions
*
* @package Generate
*/
Is it right?
Should I write the code below?
I actually found a better solution while doing a client site with this plugin.
Go to "Appearance > Menus" and remove your Blog page.
Now open the Custom Links module on the left, and add the URL and label for your blog page and re-add it.
This should stop any weird highlighting.
But what happens is that not the calendar section is active.
Doing what I suggested above should make it so the calendar menu item will be highlighted when you're on it, but the blog menu item won't be highlighted unless you're specifically on the blog.
Hi Tom,
So I have to add the php code. Right?
Please answer me what I asked you in http://generatepress.com/forums/topic/problem-with-events-calendar/#post-110953
Thanks
I've added the php code in functions.php well and my website is not seen.
<?php
/**
* Generate child theme functions and definitions
*
* @package Generate
*/
add_filter('nav_menu_css_class', 'generate_te_active_menu', 400);
function generate_te_active_menu($menu) {
$post_type = get_post_type();
switch($post_type) {
case 'tribe_events':
$menu = str_replace('current-menu-item', '', $menu);
$menu = str_replace('current_page_item', '', $menu);
break;
}
return $menu;
}
That code is no longer necessary if you follow the steps I posted here: http://generatepress.com/forums/topic/problem-with-events-calendar/#post-110973
To remove the highlighting from the blog menu item while on the events page, remove the blog menu item page from your menu, and re-add it as a custom link.
Ok!!
The calendar has been very good,
Thanks Tom!!
