[wp-hackers] running a filter on stylesheet and template

Andrew Nacin wp at andrewnacin.com
Tue Jul 2 13:42:48 UTC 2013


On Tue, Jul 2, 2013 at 9:32 AM, Chris McCoy <chris at lod.com> wrote:

> im running a filter on stylesheet and template to serve up a mobile theme,
> if i put the code in a plugin it works fine, but when its in a theme it
> doesnt seem to be running the filter.


If you try to have a different theme loaded after the theme has already
loaded, well, you're gonna have a bad time. You could either do this in
a plugin or use the template_include filter, or a host of other ways
depending on the desired effect.


More information about the wp-hackers mailing list