Skip Navigation

When Divi is active, custom CSS added to a View inserted into a page is applied to a WordPress Archive search

Won't fix

Symptoms

The issue happens in the following case:

  • You have a View listing posts and some custom CSS added to this View using one of the CSS editor tabs.
  • Your View listing posts is inserted into a page.
  • You also have a WordPress Archive with a custom search, designed using Toolset.
  • You use the custom search on the WordPress Archive and the results include the page where your View listing posts is inserted.

When the Divi theme is active the custom CSS from the View listing posts is also loaded. This happens even when if the View doesn’t display the post content (body).

Workaround

This issue can’t be fixed from the Toolset side because some themes apply the_content filter on the excerpt which doesn’t follow the WordPress standards.

To avoid this issue please be more specific with the CSS you add.

For example, instead of adding the following CSS:

.my-css-rule {
// this will be applied to the search-results page
}

You can use something like this:

body.single .my-css-rule {
// this won't be applied to the search-results page but only to the single page
}

Leave
a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>