I’m trying to enque stylesheet depending on template but unfortunetelly my code isn’t working. What I am doing wrong? if ( is_page_template('single-location.php')) { function themename_include_page_specific_css() { wp_enqueue_style('paralax_style', get_template_directory_uri().'/paralax.css'); }...
  • May 21, 2022
  • 0 Comments
I’m building a custom theme for a client and I’ve been adding stylesheets incorrectly for a while, so I decided to do it the correct way :-). However, when...
  • May 20, 2022
  • 0 Comments
When I enqueue Bootstrap with wp_enqueue_style(), Bootstrap is loaded after the child theme’s style.css and will override style.css. One way to load style.css after Bootstrap is to enqueue style.css...
  • May 19, 2022
  • 0 Comments
I want to add dynamic CSS, so currently I am adding directly to the div, ie: $color = "#000000"; echo '<div style="background:'.$color.'"> Is it bad to add code like...
  • May 19, 2022
  • 0 Comments