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

2 Answers 2


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:



  • Please edit your answer, and add an explanation: why could that solve the problem?
    – fuxia
    Apr 19, 2020 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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