Hiding sidebar in Sage 9?

What’s the intended way to hide the sidebar from a particular page in Sage 9?

According to the docs the method (below) is the same as it was in Sage 8, but I haven’t been able to find that code anywhere in my Sage 9 project… Are we supposed to add this ourselves? If so, where is the best place to do so? filters.php?

add_filter('sage/display_sidebar', function ($display) {
    static $display;

    isset($display) || $display = in_array(true, [
      // The sidebar will be displayed if any of the following return true

    return $display;

Never mind… Adding it to filters.php seems to work fine. I always thought it was included somewhere by default, but maybe not.

1 Like

This topic was automatically closed after 42 days. New replies are no longer allowed.