WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 have changed my permalink structure to /%category%/%postname%/.The links are working, but the problem is that my style.css is not working in some of the posts which are inside the category.

share|improve this question
Can you link me to the problem? – Matt Jan 11 '11 at 17:14
i found out the reason..when i changed the permalink,the url is like 'domainname/category/page' and now for style sheet the requested url is like 'domain name/category/wp-content/twentyten/style.css.'is this the problem with permalink? – treesa Jan 11 '11 at 17:14
how come the style sheet url change like this? – treesa Jan 11 '11 at 17:14
what's the code you're using for the stylesheet url? <?php bloginfo('stylesheet_url'); ?> or something else? – eileencodes Jan 11 '11 at 17:14

At a guess I'd say you're linking to your stylesheet with a relative url like so:

<link href="wp-content/themes/my-theme/style.css" rel="stylesheet" />

so when you end up anywhere other than the home page it's looking at the full URL plus the path indicated to your stylesheet.

Make sure your stylesheet URL begins with a slash if you're putting it in as static HTML eg:

<link href="/wp-content/themes/my-theme/style.css" rel="stylesheet" />

Even better though is to use the built-in wordpress function for getting the stylesheet URL as Eileen has indicated in the comments. Use this syntax:

<link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" />

In order to include other CSS files look into the wp_enqueue_style() function in the codex - http://codex.wordpress.org/Function_Reference/wp_enqueue_style

share|improve this answer
thanks..it works.!! – treesa Jan 12 '11 at 9:27
np. Can you mark it as the answer to your problem? Keeps the site tidy and rewards me with reputation :) – sanchothefat Jan 12 '11 at 12:34

Your Answer


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