Exclude custom post type from taxonomy archives

Support Meta Box AIO Exclude custom post type from taxonomy archivesResolved

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #41448
    OlivierOlivier
    Participant

    Is it possible to exclude specific custom post types from the taxonomy archives?

    #41460
    PeterPeter
    Moderator

    Hello,

    Where is the taxonomy archives that you mention? If it is View location, you can go to Meta Box > Post Types > Edit CPT > Advanced tab > Disable option "Has archive".

    #41472
    OlivierOlivier
    Participant

    Hi Peter,

    I'm not sure I understand your question. The taxonomy archive is in the typical locations automatically created by WordPress for any taxonomy, i.e. http://www.site.com/taxonomy_name_slug/taxonomy_term_slug

    I have already disabled archives for the CPT in question, and that works fine. But that CPT still shows up on the archives of the taxonomy (along with another post types), and I would like this specific CPT *not* to appear in the archives of that taxonomy.

    Does it make sense?

    #41480
    PeterPeter
    Moderator

    Hello,

    It's the taxonomy archive page on the frontend. You can go to Meta Box > Post Types > Edit CPT > Advanced tab > Enable option "Exclude from search" to exclude the CPT.
    Or follow this topic to use the code https://wordpress.stackexchange.com/questions/390635/how-do-i-exclude-posts-from-custom-taxonomy-from-a-custom-post-type-archive

    #41488
    OlivierOlivier
    Participant

    "Exclude from search" worked! thank you

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.