Quantcast
Channel: When to use add_action('init') vs add_action('wp_enqueue_scripts') - WordPress Development Stack Exchange
Browsing latest articles
Browse All 4 View Live

Answer by Den Pat for When to use add_action('init') vs...

This answer is not for your question exactly but there is one other issue in your code.You never need to use and should not use:wp_enqueue_script('jquery');If you want to use the jquery provided by...

View Article



Answer by Chip Bennett for When to use add_action('init') vs...

There are multiple issues here, that are inter-related.The correct action hook to use to enqueue scripts is wp_enqueue_scriptsTo print scripts in the footer via wp_enqueue_script(), set the $footer...

View Article

Answer by EAMann for When to use add_action('init') vs...

A lot of plugin developers don't do things the right way. The right way is to hook on to wp_enqueue_scripts like you're trying to do.However, here's the order of the hooks run in a typical...

View Article

When to use add_action('init') vs add_action('wp_enqueue_scripts')

In my theme's functions.php, I'm calling an add_action in order to gain a measure of control on where jquery is loaded (in the footer along with my theme's other scripts). The problem I'm having is...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images