- This topic has 15 replies, 2 voices, and was last updated 8 years, 4 months ago by
Tom.
-
AuthorPosts
-
May 21, 2015 at 7:56 am #109355
Gustavo
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!
May 21, 2015 at 8:14 am #109363Tom
Lead DeveloperLead DeveloperHi there,
This thread may help: http://generatepress.com/forums/topic/generatepress-and-the-events-calendar/
Let me know ๐
May 22, 2015 at 12:37 am #109586Gustavo
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/May 22, 2015 at 7:45 am #109666Tom
Lead DeveloperLead DeveloperSorry for not getting back to you sooner – different time zones ๐
Go to “Events > Settings > Display” and choose “Default Page Template” under the “Events Template”.
May 22, 2015 at 8:27 am #109679Gustavo
Hi there,
1: The option you indicate shows the sidebar.
2: On the menu shows the active blog section instead calendar.May 22, 2015 at 8:40 am #109680Tom
Lead DeveloperLead DeveloperIf 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/
May 28, 2015 at 8:27 am #110953Gustavo
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?May 28, 2015 at 9:12 am #110973Tom
Lead DeveloperLead DeveloperI 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.
May 28, 2015 at 9:32 am #110986Gustavo
But what happens is that not the calendar section is active.
May 28, 2015 at 9:51 am #110993Tom
Lead DeveloperLead DeveloperDoing 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.
May 29, 2015 at 6:28 am #111137Gustavo
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-110953Thanks
May 29, 2015 at 7:53 am #111162Gustavo
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;
}May 29, 2015 at 8:37 am #111172Tom
Lead DeveloperLead DeveloperThat 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.
May 30, 2015 at 9:02 am #111426Gustavo
Ok!!
June 1, 2015 at 2:09 am #111727Gustavo
The calendar has been very good,
Thanks Tom!!
-
AuthorPosts
- You must be logged in to reply to this topic.