is_post_type_archive is false when I pass GET parameters in the URL

by csaborio   Last Updated August 14, 2019 07:08 AM

So I am modifying the main query and basically asking:

if is_post_type_archive('event') {

This evaluates to true if the URL is:


But is false when I have a get parameter:


I am sure this code was working before and now it's giving me false when I include the GET...any pointers are greatly appreciated.

Answers 1

My fault, I had defined the slug as 'events', hence I should have used:


August 14, 2019 06:01 AM

Related Questions

Updated January 03, 2018 21:08 PM

Updated August 13, 2016 08:03 AM

Updated April 13, 2017 17:08 PM

Updated September 28, 2017 20:08 PM

Updated September 06, 2017 18:08 PM