[wp-hackers] Term Meta - Trac'd already?

Daniel Cameron dan at sproutventure.com
Wed Jul 13 21:07:18 UTC 2011


> > Yeah, this isn't going to work for the theme users though; I forgot to
> > mention this is a "premium" theme so there's a ton of users using this
> > functionality and to tell they need to add conditional templates and CSS
> > wont work.
> >
> > What I did was built a UI on the term edit screen with colorpickers and
> > background image uploaders.
>
> Okay then, so you use a generic taxonomy.php file in the theme. This
> will be used for all taxonomy archives.
>
> Then, in that file, you can do this to get the term and the taxonomy:
>
> $object = get_queried_object();
> $taxonomy = $object->taxonomy;
> $term = $object->slug;
>
> Your users don't need to know how it works, nor would they need to
> edit CSS and such. That's a matter of implementation details, not a
> matter of UI.


Thanks but I already know the basics of getting the current term object, I
do that now to get the meta for some action hooks. Maybe I'm not explaining
the feature it's implementation well enough; would thinking about the
background picker in 2010 for each term be better? Each site owner has
different locations that they create and has their own preference for colors
and background.


More information about the wp-hackers mailing list