A WordPress plugin which contains a collection of modules to apply theme-agnostic front-end modifications.
Soil is a commercial plugin available from https://roots.io/plugins/soil/. It's hosted on a public GitHub repository to allow for contributions from the community. It's also published on Packagist to allow easier installation with Composer.
Prerequisite | How to check | How to install |
---|---|---|
PHP >= 5.4.x | php -v |
php.net |
You can install this plugin via the command-line or the WordPress admin panel.
If you're using Composer to manage WordPress, add Soil to your project's dependencies.
composer require roots/soil
Then activate the plugin via wp-cli.
wp plugin activate soil
- Download the latest zip of this repo.
- In your WordPress admin panel, navigate to Plugins->Add New
- Click Upload Plugin
- Upload the zip file that you downloaded.
-
Cleaner WordPress markup
add_theme_support('soil-clean-up');
-
Disable asset versioning
add_theme_support('soil-disable-asset-versioning');
-
Disable trackbacks
add_theme_support('soil-disable-trackbacks');
-
Google Analytics (more info)
add_theme_support('soil-google-analytics', 'UA-XXXXX-Y');
-
Load jQuery from the jQuery CDN
add_theme_support('soil-jquery-cdn');
-
Move all JS to the footer
add_theme_support('soil-js-to-footer');
-
Cleaner walker for navigation menus
add_theme_support('soil-nav-walker');
-
Convert search results from
/?s=query
to/search/query/
add_theme_support('soil-nice-search');
-
Root relative URLs
add_theme_support('soil-relative-urls');
And in a format you can copy & paste into your theme:
/**
* Enable features from Soil when plugin is activated
* @link https://roots.io/plugins/soil/
*/
add_theme_support('soil-clean-up');
add_theme_support('soil-disable-asset-versioning');
add_theme_support('soil-disable-trackbacks');
add_theme_support('soil-google-analytics', 'UA-XXXXX-Y');
add_theme_support('soil-jquery-cdn');
add_theme_support('soil-js-to-footer');
add_theme_support('soil-nav-walker');
add_theme_support('soil-nice-search');
add_theme_support('soil-relative-urls');
Use the Roots Discourse to ask questions and get support. License is required.
Contributions are welcome from everyone. We have contributing guidelines to help you get started.
Keep track of development and community news.
- Participate on the Roots Discourse
- Follow @rootswp on Twitter
- Read and subscribe to the Roots Blog
- Subscribe to the Roots Newsletter
- Listen to the Roots Radio podcast