If you want to add CSS to a compared page or category-taxonomy etc, here’s a quick way:
// Function to apply css on specific page url by NicolasLagios.com add_action( 'init', 'css_me_bash_to_url_by_Nicolas' ); function css_me_bash_to_url_by_Nicolas() { $url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; if ( false !== strpos( $url, 'string' ) ) { //here we change the string as we want, eg for mysite.com/site/something/somethingelse.html , we put the word "something" echo '<code class="php plain"><style type=</code><code class="php string">"text/css"</code><code class="php plain">></code> /*here we write css code*/ </style>'; } }
If you need help
Original Source: https://nicolaslagios.com/wordpress-%cf%83%cf%85%ce%bd%ce%ac%cf%81%cf%84%ce%b7%cf%83%ce%b7-%cf%80%cf%81%ce%bf%cf%83%ce%b8%ce%ae%ce%ba%ce%b7-css-%ce%bc%ce%b5-%ce%b2%ce%ac%cf%83%ce%b7-%cf%84%ce%bf-url/