Did you call <?php wp_head(); ?> *after* wp_enqueue ?
Hi veganist!
Did you mean to ask, if I have <?php wp_head(); ?> in my theme?
yes I do.
This is a weird case. I’ve done everything “by the book” and it doesn’t work. But if I do it “the wrong way” it works. I’m tempted to…
This is a function to place a JavaScript color-picker to my theme options (trough function.php), so we´re talking “admin context” not front-end.
I tried both:
add_action('admin_print_scripts', 'myColorChoiceScriptz');
add_action('admin_init','myColorChoiceStyles');
to hook my functions, but none seem to work properly (I’ve tried both combination for scripts and CSS)
They DO place the scripts, and the CSS in the markup, but then the browser ignores them!
The fist thing that comes to my mind is: – they are been processed in a wrong order, that’s why they are being ignored.
But according the the Codex, “admin_init is triggered before any other hook when a user access the admin area”, so it doesn´t make sense.
It probably is just a detail I’m missing here.
HELP!
MAC
Hummmm
Did you call <?php wp_head(); ?> *after* wp_enqueue ?
You might have a point that I missed, <?php wp_head(); ?> can be too “low” 🙂 on the markup, thus making head scripts to load after the other “wicked stuff” I’m calling!
I’ll give it a try and place it at the beginning of the markup!
MAC
Silly me!
I was not thinking. This has nothing to do with <?php wp_head(); ?> since this refers only to the admin section, and not the theme itself.
But it was a nice try 🙂
MAC
once again: HELP!
Please grab some heavy stones and aim at my dumb head.
I was calling a JQuery-dependent-script, BEFORE I called the JQuery script itself.
Shoot at will, I deserve it.
MAC 🙂