str_replace inside specific css files [closed]

No, because the CSS file isn’t loaded in and parsed by PHP—it’s just “printed” to the browser at the appropriate time. You can, however, add inline styles to an enqueued stylesheet, which you would then be able to manipulate with filters. In the code snippet below, let’s assume you’re using wp-content/plugins/my-plugin/assets/style.css. add_action( ‘wp_enqueue_scripts’, ‘wpse406238_inline_css’ ); … Read more

How to change “““ to “““?

The headings will be defined in many different places, mostly in the theme and in the page content. So using JS as you have will be the most reliable approach. A few things to note about enqueuing scripts: As your script uses jQuery, you need to pass jQuery as a dependency to make sure it … Read more

Problem Implementing parallax in header of bp-default theme

First off — When including Javascript, use a function hooked to the init action in functions.php. See: http://scribu.net/wordpress/optimal-script-loading.html Secondly — The CSS for the BP bar is being effected by something in your theme. If fixing how your Javascript is loading first doesn’t fix that issue, try selecting that object in Firebug (Or Chrome’s developer … Read more

WordPress noob, assign custom stylesheet using @import or if? Didn’t work for me

There’s a part in your header template that’s already doing conditional loading: <?php if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ ); ?> This code loads the JavaScript for comments into the queue; WordPress then loads all of the scripts when it fires the wp_head() trigger. My recommendation would be to use your functions.php file to register … Read more