[wp-hackers] echobig and TinyMCE, and themes/categories

Ian Barber ian.barber at gmail.com
Fri Nov 17 11:02:39 GMT 2006


On 11/17/06, Peter Westwood <peter.westwood at ftwr.co.uk> wrote:
>
>
>
> If you only want to theme a certain category differently then you can
> probably using the 'template_redirect' hook [1][2] to change the theme if
> that category is selected.
>
> [1]
>
> http://trac.wordpress.org/browser/tags/2.0.5/wp-includes/template-loader.php#L3
> [2] http://wphooks.flatearth.org/hooks/template_redirect/
>
> westi


I looked at the redirect hook, but it means the template constant has
already been set, and you have to handle the different case in the plugin.
Obviously that's all doable, but if you can filter the template name it just
involves changing the one variable (well, two for the stylesheet) and then
rest is handled. I suppose that in the majority of cases there's only going
to be a couple of pages requiring it and you can fall through to the regular
handling for the rest.

Thanks westi,

--
Ian Barber
http://www.gunfist.com


More information about the wp-hackers mailing list