• Hi,

    I want to display a list of posts with a chosen tag on one archive page.

    I created with site editor a template for all archives and a template for tags. But if I choose a tag an a post I always get a default template from spectra one.

    thank you,

    Michael

    • This topic was modified 1 year, 2 months ago by MIBL.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @mibl,

    Thank you for getting back to us.

    You can create a new template of type “Tag Archives” and customize it as per your requirements. Here’s a short video to show you the same:- https://d.pr/v/xKnWha

    Kindly try the same and let us know if it helps.

    Have a nice day!

    Thread Starter MIBL

    (@mibl)

    Thank you, I have a template “Schlagwort-Archive” in German. But it is not used. The postid is “postId=spectra-one%2F%2Ftag”

    I have tags on normal posts and custom posts. I doesn’t work either. I always get the blue default template.

    Maybe the problem are the tags of the custom post type. With the standard posts it works but not the tags of the Custom post type.

    To handle them I found a code snippet

    add_filter(‘pre_get_posts’, ‘query_post_type’);
    function query_post_type($query) {
    if( is_tag() ) {
    $post_type = get_query_var(‘post_type’);
    if($post_type)
    $post_type = $post_type;
    else
    $post_type = array(‘nav_menu_item’, ‘post’, ‘rezis’);
    $query->set(‘post_type’,$post_type);
    return $query;
    }

    This seems to be the problem. If this is active the tag-archive-template ist not found. If it is inactive shows the right archive page, the normal posts and not the Custom type posts.

    How can I get the custom posts?

    with regards

    Michael

    Hi @mibl,

    Can you please ensure that the show_in_rest parameter is true for both the custom taxonomy and custom post type that you are using? If it is still not working, I request you open a support ticket from here:https://wpspectra.com/support/ so that our support dev can help better.

    Looking forward to hearing from you.

    Have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wrong archive template’ is closed to new replies.