Ready to get started?Download WordPress


Custom Post Type UI
[resolved] Tag archive link not found (8 posts)

  1. Foreverbarcelona
    Posted 10 months ago #


    Thank you for your plugin, it saved me a lot of time when I changed theme and some subfolders seemed to disappear...

    However, I have noticed that when I try to visualize the archives for the entries with a tag, I get a Not Found page. Here is an exemple:

    It only happens with the custom type posts (the tags for non-custom posts do appear)

    Any idea on how to solve it will be appreciated. Thanks a lot!


  2. Michael Beckwith
    Plugin Author

    Posted 10 months ago #

    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.

  3. Foreverbarcelona
    Posted 10 months ago #

    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,


  4. Michael Beckwith
    Plugin Author

    Posted 10 months ago #

    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.

  5. Foreverbarcelona
    Posted 10 months ago #

    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!


  6. Foreverbarcelona
    Posted 10 months ago #

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

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


  7. Michael Beckwith
    Plugin Author

    Posted 10 months ago #

    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.

  8. ptitepalou
    Posted 9 months ago #

    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 !


You must log in to post.

About this Plugin

About this Topic