WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Trouble with is_post_type_archive()

[Resolved] Trouble with is_post_type_archive()

  • 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_front_page() or !is_home() doesn’t seem to affect it.

    Any tips?

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Trouble with is_post_type_archive()’ is closed to new replies.