Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disabling/Enabling Theme Sidebar on the fly #35

Closed
danieliser opened this issue May 1, 2016 · 1 comment
Closed

Disabling/Enabling Theme Sidebar on the fly #35

danieliser opened this issue May 1, 2016 · 1 comment

Comments

@danieliser
Copy link

Would it be considered bad practice to include the filter inline with a template?

add_filter( 'sage/display_sidebar', '__return_false' );

For instance adding this at the top of a template should allow disabling of the sidebar for that template, allowing for localized control, so you don't have to dig around to find the filter that controls it for a certain template, or deal with conditionals to specifically target the template your already editing.

Just thought that may be useful in the documentation.

@retlehs
Copy link
Sponsor Member

retlehs commented May 1, 2016

for disabling it 'on the fly' you could use https://roots.io/plugins/roots-wrapper-override/

@retlehs retlehs closed this as completed Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants