0
votes
2answers
64 views

jQuery does not work

I am working on a project where I need jQuery for. I added this to my functions, and the scripts are loaded in my header if I watch my page source, but jQuery doesn't work. What am I doing wrong? ...
-2
votes
2answers
112 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( ...
0
votes
2answers
60 views

Why I can't load my JavaScripts using an hook inside my functions.php file?

I am pretty new in WP (I came from Joomla) and I have the following problem: I am carrying this pure HTML theme (that use BootStrap CSS framework) into a WordPress theme. This is the original pure ...
0
votes
0answers
48 views

Remove “enqueued” script from array

Im working on optimizing a child theme for a site and the parent "has more than we need" Lots of requests being generated all adds up to performance hits. What I'm trying to accomplish is this effect ...
0
votes
2answers
645 views

Hook 'wp_enqueue_scripts' priority has no effect

In a theme I am working there are up to 3 Stylesheets. I am using the hook 'wp_enqueue_scripts'. The order of the stylesheets is important for overwriting styles. I have a code like this: ...
0
votes
1answer
146 views

“admin_enqueue_scripts” hook or $_GET['page']?

When adding a function to "admin_enqueue_scripts" a hook is passed to the function. It looks like this "toplevel_page_nameofyourpage". That works great, but how is it different from checking the $_GET ...
2
votes
1answer
1k views

How do I implement the Wordpress Iris picker into my plugin on the front-end?

This question here is asking the same question as I am, but there were no adequate answers nor a selected correct answer so I am asking again hoping if I ask in a more coherent manner I might get a ...
0
votes
3answers
956 views

What can I hook into after_setup_theme?

I'm wondering what can I or should I NOT hook to after_setup_theme? I'm wondering because I have been told that I shouldn't hook wp_enqueue_style to it, but I have seen other places using it to hook ...
0
votes
1answer
256 views

wp_enqueue_script before wp_head

If this works (and it's the way people do in a bunch of themes around the web): <html> <head> <!-- stuff --> <?php wp_enqueue_script('jquery'); ?> <?php ...
2
votes
2answers
582 views

Is it possible to enqueue a script from a widget method (of extended WP_Widget object)?

I am creating a widget plugin that a user could potentially use multiple iterations of the widget multiple times on a single widget-area / multiple widget-areas on a single page. Because of its ...
1
vote
2answers
84 views

Same Conditionals Not Working on Two Different Hooks

Everyone! I am new to WP and trying to build a plugin. I have the following codes working properly: add_filter('the_content', 'say_hello'); function say_hello($content){ if(is_single() || ...
7
votes
3answers
4k views

How to enqueue scripts on custom post add/edit pages?

I'm trying to enqueue a JS script only when someone is adding or editing a custom post type I created called "recipes". Currently the script works ok when I do this: if (is_admin()){ ...
26
votes
1answer
5k views

Where is the right place to register/enqueue scripts & styles

I am using WordPress 3.1.4 by now. I am confused with where (which hook) do I use: to register and/or enqueue scripts and styles on front- and back-ends? Questions: Which are right hooks to ...