# Soil Plugin - Not seeing any changes after install

**URL:** https://discourse.roots.io/t/soil-plugin-not-seeing-any-changes-after-install/25384
**Category:** plugins
**Tags:** soil
**Created:** 2023-05-20T11:08:33Z
**Posts:** 4

## Post 1 by @bryansmullen — 2023-05-20T11:08:34Z

I’ve just purchased and downloaded the soil plugin, and tried installing it on the Sage 10 theme. I can install and activate it without issue, but whether the plugin is activated or not, I do not see any improvements in the markup. For example I still see script tags in the head and early in the body despite having ‘js-to-footer’ enabled. I have do not see any google analytics injected, nor am I prevented from accessing the REST api by simply firing a get request to [http://sage.test/wp-json/wp/v2/posts](http://sage.test/wp-json/wp/v2/posts)

I have added the following to the themes/sage/app/setup.php:

```
add_action('after_setup_theme', function () {
    /**
     * Enable features from the Soil plugin if activated.
     */
    add_theme_support('soil', [
        'clean-up', // Cleaner WordPress markup
        'disable-rest-api', // Disable REST API
        'disable-asset-versioning', // Remove asset versioning
        'disable-trackbacks', // Disable trackbacks
        'google-analytics' => 'UA-XXXXX-Y', // Google Analytics
        'js-to-footer', // Move JS to footer
        'nav-walker', // Clean up nav menu markup
        'nice-search', // Redirect /?s=query to /search/query
        'relative-urls', // Convert absolute URLs to relative URLs
    ]);
});
```

Am I misunderstanding something in the installation and setup process?

---

## Post 2 by @strarsis — 2023-05-20T15:44:16Z

Hm, Sage already adds theme support for the `soil` plugin.

> <https://github.com/roots/sage/blob/c0d3dd87f7c13ff201c6b9f7730c970dcbba3f08/app/setup.php#L35-L45>

This may also be interesting:  
[https://discourse.roots.io/t/theme-support-for-soil-3-x-and-4-x/21322](https://discourse.roots.io/t/theme-support-for-soil-3-x-and-4-x/21322)  
[https://discourse.roots.io/t/has-anyone-had-issues-with-product-filters-for-woocommerce/19455/9](https://discourse.roots.io/t/has-anyone-had-issues-with-product-filters-for-woocommerce/19455/9)

---

## Post 3 by @bryansmullen — 2023-05-21T01:16:49Z

Aha - yes this would indeed be the issue. I had added the add\_theme\_support line as per the soil docs, not expecting it to already exist in sage since in my mind they are entirely independant, so the first instance was getting executed, but the one i added was not.

---

## Post 4 by @strarsis — 2023-05-21T02:13:24Z

Yes. When `add_theme_support` is called multiple times for the same key (`soil`), the previous optional extra arguments are completely overridden by the new ones:

> <https://github.com/WordPress/wordpress-develop/blob/f0a27d908b41368b568189c48b65d873610f5e99/src/wp-includes/theme.php#L2843>

When multiple action handlers are (inadvertently) calling `add_theme_support`, the optional extra arguments of the action handler called last will be the one actually used.

---

## Post 5 by @system — 2023-07-01T11:08:57Z

This topic was automatically closed after 42 days. New replies are no longer allowed.
