WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two sidebar widgets, I need to display 1 widget on the archive pages for the standard post categories and the other widget needs to show on just the archive pages for a specific custom post type.

If I use the conditional tag is_archive() then both widgets will show up on both archive pages.

How can I determine which archive page the widgets should be displayed on?

I'm using the plugin 'Widget Logic'

Thanks in advance

share|improve this question

You could use the is_tax() function to accomplish this.

The first parameter, the taxonomy slug is optional, but you do want to specify it. This would be something like product-categories. The second, a specific term, is also optional. It'd be perfectly acceptable to have the following:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.