Full Width Posts

After reading through http://roots.io/the-roots-sidebar/, I’m trying to figure out the best way to get full width post on user selection. A post template would be ideal but that doesn’t seem possible with Roots. No selection or options for post templates.

The only thing I’ve figured out is with in the config.php file under roots_display_sidebar. I can put in array(‘is_single’, array(‘169’, ‘170’)) with the numbers corresponding to the post ID’s. But providing the user an option while editing a post to add to the array is where I’m stuck.

Any solutions to this? What did you do to get full-width for certain posts? I’m going to check out “Custom Metaboxes and Fields” right now to see if that helps as well.


My Roots Wrapper Override plugin will enable you to do this.

Just create a second base template without the sidebar and select that from the drop down menu on the posts/pages you want the sidebar removed from.

Of course if you want to code something yourself, then you’re on the right track. You can override the sidebar setting with the roots_display_sidebar filter and link it to a meta field.


Awesome. Purchased. Would be great to have this not as a plugin though. These options are going to confuse my clients and there’s a chance of them deleting the plugin.

Thanks for the purchase.

If you check out the FAQ, it fully details how to customise the support text, which will hopefully help avoid any confusion with your clients. The same FAQ will also tell you how to use nice names for the templates, so you can call one Show Sidebar and the other Hide Sidebar.

If you want to prevent your clients from disabling the plugin:

  1. Create a folder in your wp-content folder called mu-plugins.
  2. Move the roots-wrapper-override folder into mu-plugins.
  3. Move roots-wrapper-override.php from its folder into the root of mu-plugins.
  4. Edit roots-wrapper-override.php changing line 30 to: include_once('roots-wrapper-override/src/plugin.php'); to reflect the new file path.

The plugin should now be a “must-use” that can only be disabled by deleting it from the server. If you have any issues, give me a shout.

Ah! That would explain why it wasn’t working when I placed it in mu-plugins. Awesome!
Unfortunately Synthesis doesn’t seem to let you to create anything inside mu-plugins directory. Oh well. A plugin will do. Thanks!!

The same principle applies if you would like to put my plugin inside the theme folder; every host should let you do that!

  1. Create a plugins folder in lib and move the plugin there (no need for any edits).
  2. Edit lib/custom.php and add include_once('plugins/roots-wrapper-override/roots-wrapper-override.php');

Although please don’t do this if you are redistributing the theme.

1 Like

Ah makes sense.

This is for a specific client, no worries.

I try to buy the Roots Wrapper Override and it shows $10, but when I click it is only let me select 5 license multisite for $35 or even more.

Thanks for getting in touch.

There must have been a change on Gumroad as the multisite field wasn’t required previously. I have added a single site option as a fix.