0

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>
<?php

}

add_action('admin_head', "admin_head");

And then in theme-admin.js ...

jQuery(document).ready(function($)
{   
    $("#datepicker").datepicker({
        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

2 Answers 2

1

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.

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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