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

Otto otto at ottodestruct.com
Wed Jul 13 21:01:30 UTC 2011

On Wed, Jul 13, 2011 at 3:48 PM, Daniel Cameron <dan at sproutventure.com> wrote:
> 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.


More information about the wp-hackers mailing list