Site logo

Archived topic

Problem with Events Calendar

15 replies · Started by Gustavo on May 21, 2015

Viewing posts 1–15 of 16

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!

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.

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;
}

Ok!!

The calendar has been very good,

Thanks Tom!!

This archived topic is closed to new replies.