Soil: Roots Framework Features That Can Be Used With Any WordPress Theme

Roots is a WordPress starter theme that incorporates the HTML5 Boilerplate, Bootstrap, and Grunt. It’s also known for creating cleaner HTML, cleaner script output, and its unique theme wrapper method for handling template markup.

Up until now, you’d have to use the Roots theme in order to take advantage of any of its features. Ben Word, Roots’ creator, has now made some of the theme’s features available for use within any WordPress theme via a new plugin called Soil.

Soil offers you the benefits of three distinctive Roots features:

WordPress Markup Cleanup

Relative URLs

Nice Search – (/search/query/)

The “Clean-Up” feature enables the following:

wp_head() clean up

Remove WP version from RSS feeds

Clean up attributes

Clean up tags

Clean up body_class()

Wrap embedded media as suggested by Readability

Use figure and figcaption tags for WP captions

Remove unnecessary dashboard widgets

Remove unnecessary self-closing tags

How to Use Soil with Your WordPress Theme:

photo credit: JerseyRed – cc

Step 1. Install and activate the Soil plugin.
Download Soil from Github and unpack/rename folders as necessary. Add to your plugins folder.

Step 2: Add Soil theme support to your theme’s functions.php file.

[php]add_theme_support(‘soil-clean-up’);
add_theme_support(‘soil-relative-urls’);
add_theme_support(‘soil-nice-search’);[/php]

If the full Roots theme is not for you but you appreciate some of its features for cleaner markup and URLs, then the Soil plugin is an easy way to port those over to your theme. For more in-depth information on root relative URLs and the clean up changes it makes, check out the Roots 101 guide.