Support » Plugin: Custom Post Type UI » Tag archive link not found

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Michael Beckwith


    Hopefully you’ve figured out the issue since you first posted this. However, if not, I’ll do what I can.

    I assume you’ve added tag support for your newly registered Custom Post Type, via the “advanced options” link.

    I also assume you’ve created some posts with some tags as well.

    A quick search has my initial hunch looking correct. Out of the box, WordPress apparently doesn’t add new post types to category and tag archive listings.

    Here’s an article with a quick tutorial on how to change this, and get post types in those archives.

    It’s a small snippet and I’ve verified it’s good code, so it will be safe to use.

    Let me know if that helps get this resolved for you. I’ll probably add it to the plugin FAQs for future reference as well.

    Hi Michael,

    Thank you for your quick reply!
    I did find a post where you mentioned the Advanced Options link, unfortunately, I was not able to find it anywhere. If you could show me how to find it, that would be soooo helpful.
    Thanks again,


    Plugin Author Michael Beckwith


    It’s part of our CPTUI Plugin, and right below the 3 fields you use to create the CPT slug and name and description. However, I think the link above will be very helpful as well if you haven’t looked at it yet. Worst case, I could type up the exact code you need to save to your functions.php, if you’re not comfortable with code.

    Hi Michael!

    Thank you so much! Looks like I had already checked the tag and category support. So I went and tried the code you suggested. I here is what I copied on the file:

    function add_custom_types_to_tax( $query ) {
    if( is_category() || is_tag() && empty( $query->query_vars['suppress_filters'] ) ) {
    // Get all your post types
    $post_types = array( 'post', 'bl_portfolio' );
    $query->set( 'post_type', $post_types );
    return $query;
    add_filter( 'pre_get_posts', 'add_custom_types_to_tax' );

    And now the archives show up but… at the bottom of the page should appear a list of my services, and something is messing up here because (only for the archive page), instead of services I get my latest blog posts… Any idea how can I solve it?

    Thanks a lot for your patience!


    By the way, here is a link with the broken services:

    And here is a link with the services as they should look like:


    Plugin Author Michael Beckwith


    Curious if your Related Posts Slider doesn’t know about your custom post type. However, that’d be an issue to bring up to that plugin author, it would seem. They should be able to help get it on your CPT archives.

    Oooh thank you so much !! I am searching for a solution for 3 4 hours !
    I do think I was not well searching .. wanted to show the custom post types in search results, but in fact it was a problem of tag and categories. So now I am going to style my search resultats page ^^ (archive)

    Thank you Michael & Foreverbarcelona !

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Tag archive link not found’ is closed to new replies.