Linked Questions

3
votes
1answer
3k views

Which action to hook wp_enqueue_script to? wp_head or wp_enqueue_scripts? [duplicate]

Possible Duplicate: Where is the right place to register/enqueue scripts & styles According to wp_enqueue_script() documentation in Codex, it seems that one should hook wp_enqueue_script() ...
1
vote
1answer
3k views

wp_enqueue_style in Plugin [duplicate]

Possible Duplicate: Where is the right place to register/enqueue scripts & styles When I enqueue a css style in a plugin like so: function add_my_stylesheet() { wp_enqueue_style( '...
0
votes
1answer
3k views

Add multiple JavaScript files to template header [duplicate]

I have multiple JavaScript files that I want to load. Some of them in my header.php and the rest in the footer.php. These are the files: <?php <script type="text/javascript src="/scripts/...
1
vote
0answers
26 views

How to enqueue script or style in a theme's template file? [duplicate]

I am making a template for the page which will contain a slider. Can anyone share some advice with me of how to go about it?
1
vote
2answers
12k views

Enqueue jQuery in WordPress

Building my first theme from scratch in Wordpress 3.4.1, I know Wordpress already has the latest version of the JQuery via Google. I have read about issue's if the script is not called properly, so ...
4
votes
4answers
839 views

Why are admin scripts not printed

I am trying to enqueue/print scripts in the admin area. But they dont seem to appear. add_action('admin_init', function() { add_meta_box('portfolio-meta', 'Details', 'portfolio_metabox_details', '...
4
votes
2answers
2k views

jQuery in header or footer

From my reading it seems there is a good case for loading scripts like jquery and dependencies into the footer as a preference if possible; however 2 things confuse me which. Firstly the default for ...
4
votes
1answer
2k views

How can we customize the logo and some text on the welcome screen?

I have found discussions and solutions on hiding or removing the lately introduced Welcome screen. But we DO find the screen, as a whole, very useful and an excellent addition. So, what we are ...
4
votes
1answer
2k views

Using Underscore Templates in WordPress

I've noticed that since WP 3.5 that we now have the Backbone.js and Underscore.js libraries included. The new Media Modal uses Underscore templates and I was wondering how would I be able to insert ...
2
votes
2answers
3k views

Where to enqueue stylesheets for plugin?

I want to enqueue stylesheet to plugin I'm developing, like this: function utm_user_scripts() { $plugin_url = plugin_dir_url( __FILE__ ); wp_enqueue_style( 'style', $plugin_url . "/css/style....
1
vote
1answer
2k views

Enqueue jQuery UI Tabs In Admin Area

Does anyone know how to enqueue the script "Jquery UI Tabs" in admin area? I want to use it inside my theme options page. Already read the related wordpress documentation but with no results... I have ...
2
votes
2answers
252 views

WordPress classes explained

Are there any books, websites or lectures that explain the built-in WordPress classes? I would really like to learn how WordPress works internally. I've dug up the core files on trac and even went ...
3
votes
1answer
1k views

Enqueue scripts inside a class

I have written a small class that will handle enqueues in my theme : <?php class Header { public function init_hooks() { add_action('wp_print_scripts', array(__CLASS__,'...
0
votes
2answers
631 views

Can't get CSS Into the Head via add_action

I'm trying to add some CSS to the head part of the CSS but I can't get it to work (I want to add it to the head before the Theme CSS so the plugin user can easily over-ride plugins default CSS without ...
1
vote
1answer
1k views

How to add parameter to wp_enqueue_script?

I have the situation that I need to include special scripts only in case a parameter in a macro is used. For the background, see the following: My plugin ChessTempoViewer which wraps a JavaScript ...

15 30 50 per page