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

I know I can use enqueue_script and enqueue_style to register scripts and stylesheets, however I'm trying to print out just the link to the adminbar css:

<link rel='stylesheet' id='admin-bar-css' \
href='http://mysite.com/wp-includes/css/admin-bar.css?ver=20111209' type='text/css' media='all' />

I could just include that text on my page but I was hoping for something like


Is there such a thing?

share|improve this question
up vote 0 down vote accepted

to print a single style:


to print a single script:


note that the handle must be registered first using wp_register_style() or wp_register_script().

http://codex.wordpress.org/Function_Reference/wp_register_script http://codex.wordpress.org/Function_Reference/wp_register_style

share|improve this answer
thx. i also found this helpful: wp_print_scripts('jquery'); – cwd Mar 8 '12 at 3:09
i think you have a typo in your print script syntax – cwd Mar 8 '12 at 3:23
you mean, wp_print_styles doesn't also print scripts? copy, paste FAIL. fixed. thanks. – helgatheviking Mar 8 '12 at 3:26

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.