-3
votes
2answers
536 views

Why does wp_enqueue_script ignore my 'wp_head' hook?

I would like css_head_scripts and js_head_scripts to be appended to wp-head but Wordpress completely ignores it? Am I missing something? function css_head_scripts() { wp_enqueue_style( ...
3
votes
2answers
1k views

How to add stylesheets only to pages with specific shortcode?

I'm running a function on pages where the shortcode [make-me-a-map] is used. It enqueues javascript to the page and makes a map. That part works fine (woot!) but I'm having trouble with adding the ...
0
votes
2answers
104 views

Display Something in the Header After All Styles are Loaded

I'd like to include a functionality in a theme that will overwrite styles from previously included CSS files. For this purpose, I need to be able to display a <style> in the header after ALL ...
0
votes
1answer
156 views

Background of default template showing instead of the background of custom page template

Plugins were not working for my custom page template, found out that I needed to put WP_head() and WP_footer(), so did that and the plugins started to work. But now the background changed to that of ...
1
vote
3answers
2k views

How do I force wp_enqueue_scripts to load at the END of <head>?

I am loading scripts via wp_enqueue_scripts in my child theme. The only problem is that my style.css script get loaded BEFORE plugin scripts, yet I need to override the css in the plugins with my ...
2
votes
1answer
1k views

How to use wp_enqueue_style() and wp_enqueue_script() only when needed?

My plugin uses wp_enqueue_style() and wp_enqueue_script() to load resources, but I have kept in mind not to degrade the performance for the user and only load these when the current set of posts ...