0

I need to hide the sidebar from the Tribe Events calendar pages using a Roots/Sage Wordpress template. I can achieve this using: 'tribe_is_upcoming' in the display_sidebar function, but this also removes it from the Blog pages. Any ideas how I can hide it from the Tribe Events pages but still display on my Blog pages?

Thanks for the help.

Pedro
  • 1,148
  • 4
  • 16
  • 35

1 Answers1

0

Turns out I needed to use the functions:

function display_sidebar() {
  static $display;

  isset($display) || $display = !in_array(true, [
  // The sidebar will NOT be displayed if ANY of the following return true.
  // @link https://codex.wordpress.org/Conditional_Tags
  is_404(),
  is_front_page(),
  is_page(),
  tribe_is_month(),
  tribe_is_upcoming(),
  tribe_is_day()
 ]);

 return apply_filters('sage/display_sidebar', $display);
}
Pedro
  • 1,148
  • 4
  • 16
  • 35