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

rootsRoots 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
photo credit: JerseyRedcc

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.

3

3 responses to “Soil: Roots Framework Features That Can Be Used With Any WordPress Theme”

  1. Hi Can you please tell me how to use this on a child theme or even the main theme because I can’t get it to work at all. I am testing on my local server. I downloaded the Soil package and put it into my plugins – activated it and then added the details to my child theme function and it didn’t work so then I tried it in the main theme and it will remove most wordpress generator stuff but not the body class or anything else. When you say “unpack/rename folders as necessary” what are you meant to rename? Thanks I would really like this to work.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.