I have some content in my sidebar that I don’t want to show in one of my archives for a custom post type.
I tried using
if (!is_post_type_archive('mytype')), but it doesn’t seem to work.
I also tried this:
if (get_post_type() != 'mytype' && !is_archive()), but then the home page hides it as well. And adding
!is_home()doesn’t seem to affect it.
- The topic ‘Trouble with is_post_type_archive()’ is closed to new replies.