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'm trying to modify the css meta tag and make use of a CDN url - and other things.

What I have tried (as a quick test) is :

function change_stylesheet_loc($uri)
    $uri = str_replace('example.com', 'cdn.example.com', $uri);
    return $uri;
add_filter('stylesheet_uri', 'change_stylesheet_loc', 20000); 

I've also tried :

add_filter('the_content', 'change_stylesheet_loc', 20000);

Nothing I'm doing is working. How can I modify the css meta tag data?

share|improve this question
Why the down votes? – Dave Jan 12 '13 at 18:21

Don't do that, use wp_enqueu_style with wp_register_style and wp_deregister_style


Also a $priority of 20k..why would you pick such an arbitrary number.

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.