WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am I smoking crack or why wouldn't this work? :/ This all seems pretty straightforward:

function admin_head()

<link type="text/css" rel="stylesheet" href="<?php bloginfo('template_url'); ?>/css/jquery-ui-1.8.9.custom.css"  />
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/jquery-ui-1.8.9.custom.min.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/theme-admin.js"></script>


add_action('admin_head', "admin_head");

And then in theme-admin.js ...

        changeMonth: true,
        changeYear: true, dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: plugin_path + '/images/icon-datepicker.png', buttonImageOnly: true});


Thank you for any insight you can provide :) Cheers

share|improve this question

You might also want to look at using wp_enqueue_script and wp_enqueue_style, rather than echoing those script & style tags. Using these functions helps to eliminate duplicate scripts and styles, as well as introducing some dependency support.

share|improve this answer
up vote 0 down vote accepted

Duh, if you're image path is bust and it's the only way it activates, it just won't load.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.