[wp-hackers] Getting a 404 error when requesting a .php file as a stylesheet in WP 3.0.1

Otto otto at ottodestruct.com
Tue Sep 7 18:08:08 UTC 2010

For javascripts, there's a better way:

For themes using this sort of thing to load stylesheets, then you have
two options:

1. Put the custom styles directly into the HTML using the wp_head
hook. This is actually the best way, as it produces the smallest code
and you can have it custom on a per-page or whatever basis you like.
This is how WordPress actually does the custom background stuff.

2. "Right way the second" as defined here:
http://ottopress.com/2010/dont-include-wp-load-please/ . This is not a
great alternative, but it will work if you're a stickler for using
separated stylesheets.


On Tue, Sep 7, 2010 at 12:34 PM, Nicolas Kuttler
<wp-hackers at nicolaskuttler.de> wrote:
> Please see
> http://ottodestruct.com/blog/2010/dont-include-wp-load-please/
> It's rather myserious why a theme would do that (unless a misguided
> coder tried to implement some ajax).

More information about the wp-hackers mailing list