an-introduction-to-the-roots-theme-wrapper.md
After reading through this guide, you will:
* Understand the Roots Wrapper and recognize how it extends and complements the WordPress template hierarchy.
* Know what is meant by the DRY Principle, why being DRY bests being WET, and see how most WordPress themes are WET.
* Be able to filter the Roots Wrapper and create a new base template for a Custom Post Type.
## Template Hierarchy
WordPress is pretty smart. Every time you load up a request it will search for the most relevant template available in your theme and load it. This is the [Template Hierarchy](http://codex.wordpress.org/Template_Hierarchy) in action and it enables us to easily customize the appearance of our sites.
This file has been truncated. show original
roots-101.md
<h2 id="theme-installation">Theme Installation</h2>
Clone the [git repo](https://github.com/roots/roots) - `git clone git://github.com/roots/roots.git` - or [download it](https://github.com/roots/roots/zipball/master) and then rename the directory to the name of your theme or website.
If you don't use [Bedrock](/wordpress-stack/), you'll need to add the following to your `wp-config.php` on your development installation:
```php
define('WP_ENV', 'development');
```
This file has been truncated. show original
the-roots-sidebar.md
After reading through this guide, you will:
* Understand how to display or hide the sidebar in Roots.
* Know how pass arguments to conditional tags with the `Roots_Sidebar` class.
* Be able to use the `roots/display_sidebar` filter to force the display of the sidebar.
## Displaying the Sidebar
Some pages absolutely need a sidebar to function properly, whereas others will have their aesthetic ruined by superfluous asides. Fortunately the `Roots_Sidebar` class in `lib/sidebar.php` gives you full control over this using a couple of arrays.
### The First Array: Conditional Tags
This file has been truncated. show original
There are more than three files. show original