Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
491 views

Correct way to enqueue page specific CSS file

I am looking for an alternate way than using functions.php and applying conditionals based on each page's ID, instead I would like to enqueue the CSS right at the top of each page like this: <?php ...
Raging Vids's user avatar
1 vote
0 answers
874 views

Bootstrap and Custom CSS in custom plugin are being overwritten by theme

This is my first plugin, and I'm having a real hard time figuring out enqueuing styles/scripts. All the code I wrote for the plugin works great, but I'm having issues with stylesheets and Bootstrap. I ...
Coltvant's user avatar
  • 187
2 votes
1 answer
2k views

if file_exists not working with wp_enqueue_style

Inside a function I'm doing something like this: $optional_css_exists = get_template_directory_uri() . "/css/optional.css"; if ( file_exists($optional_css_exists) ) { wp_enqueue_style('...
teamcrisis's user avatar