Skip to content

Soil

Version 4.1.1 • Updated August 1st, 2022

A WordPress plugin which contains a collection of modules to apply theme-agnostic front-end modifications.

Soil is compatible with all WordPress themes and plugins and doesn’t have any requirements

You don’t need to use any other Roots projects to use the features from Soil.

Features

Cleaner WordPress markup

  • Clean up wp_head()
    • Remove unnecessary <link>’s
    • Remove inline CSS and JS from WP emoji support
    • Remove inline CSS used by Recent Comments widget
    • Remove inline CSS used by posts with galleries
  • Remove the WordPress version from RSS feeds
  • Clean up language_attributes() used in <html> tag
  • Clean up output of stylesheet <link> tags, remove unncessary type='text/css', only display media if it is meaningful
  • Clean up output of <script> tags, remove unnecessary type='text=javascript'
  • Add and remove body_class() classes
    • Add post/page slug if not present and template slug
    • Remove unnecessary classes
  • Remove unnecessary self-closing tags (/>)
  • Don’t return the default description in the RSS feed ("Just another WordPress site")

Soil’s clean up reduces the amount of front-end requests on your site:

WordPress 5.5, Twenty Twenty theme with Soil activated

Requests Total Page Size
9 272 KB

WordPress 5.5, Twenty Twenty theme without Soil

Requests Total Page Size
12 288 KB

Cleaner walker for navigation menus

Walker_Nav_Menu (WordPress default) example output:

Soil’s NavWalker example output:

Nice search

Redirect search results from /?s=query to /search/query/.

Root relative URLs

Replace many of the absolute URLs that WordPress outputs with root relative URLs.

Google Analytics

Lightweight method of adding support for HTML5 Boilerplate’s Google Analytics snippet to your site.

Move all JS to the footer

Force all WordPress enqueued JavaScript to the footer.

Disable trackbacks

Globally disable trackbacks and pingbacks.

Disable asset versioning

Remove the version query string from all styles and scripts.

  1. v4.1.1
  2. v4.1.0
  3. v4.0.0
  4. v3.9.0
  5. v3.8.0
  6. v3.7.0
  7. v3.6.0
  8. v3.5.0
  9. v3.4.0
  10. v3.3.0
  11. v3.2.0
  12. v3.1.0
  13. v3.0.0
Login to download the latest version

WordPress markup with Soil’s clean up module

Default WordPress markup without Soil