-
AuthorPosts
-
October 17th, 2021 at 10:48 #122584
Can I separate the individual theme in the CSS?
My problem is if I change something in the “Simple CSS” it works on all 4 themes.
For each Theme (Tempera, Parabola, Mantra, Nirvana), I would like to address its own CSS or better a CSS the theme separately, for example, with an ID or class in one CSS document. Is that feasible?
And of course it should not be overwritten with an update.Website: www.oelart.de
November 8th, 2021 at 00:03 #123403ZedCryout Creations mastermindHi,
The theme’s don’t add theme specific classnames or identifiers to the markup. However you should be able to do this by writing some custom (PHP) code to append the theme’s slug as an additional class to the document body tag:
function my_body_class( $classes ) { $classes[] = 'theme-' . esc_attr( get_template() ); return $classes; } add_filter( 'body_class', 'my_body_class' );
https://developer.wordpress.org/reference/hooks/body_class/
https://developer.wordpress.org/reference/functions/get_template/If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.November 19th, 2021 at 17:08 #123797 -
AuthorPosts
The topic ‘CSS’ is closed to new replies.