is it possible to add a dynamic class to a div using a filter in the functions.php? I know it’s possible for the body-tag - also for a custom defined div with an id?

if ( !is_search() ) {
   $customclass = 'myclass';
}

Read more here: Add Class to a div using a filter?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: