Monday, 26 August 2013

Custom post type archive doesn't react to is_archive after use of filter

Custom post type archive doesn't react to is_archive after use of filter

I have made a custom post type with 3 taxonomies, and a filter that lets
you choose a category from every taxonomy on the archive page. When I use
the filter and get results, it works like you'd expect. But when searching
returns zero results, for some reason the line is_archive() &&
(get_post_type == 'mycpt'()) stops working. I don't understand the reason
for this since the body class is the same as before using the filter, and
the template is the same.
I'm not sure if this makes any sense but it's kind of impossible to
describe in just a few sentences.

No comments:

Post a Comment