Skip Navigation

[Resolved] I want the CPT "Categorie" and "Tags" Archive template use the MAIN template

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 1 year, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2661419
Categories and tags banner.jpg

Tell us what you are trying to do?
I have build the archive template for a CPT "paper-opinion" but when I click on one of the Category of Tag, the result is not using the standard archive post template but another one.
=> When I tick the box 'Categories' and 'Tags' then my template, end up having both image
Question how can I make sure the Banner image is only showing only ONE banner and that "Papers & Opions" title get dynamically set depending on category (or tag) selected

Is there any documentation that you are following?
No
Is there a similar example that we can see?
no
What is the link to your site?

hidden link
I have granted Toolset temporary admin access
hidden link

#2661929

Hi,

Thank you for contacting us and I'd be happy to assist.

I enabled the 'Archive Papers & Opinions' to be used on the 'Category' and 'Tag' taxonomy archives and was able to see the duplicated header banner section.

One of them seems to be coming from the theme, on the 'Category' and 'Tag' taxonomy archives.

To overcome this, I followed these steps:

1. I included a custom class name 'top-banner-row' to the row of the header banner section in the archive, so that it can be easily identified.
( screenshot: hidden link )

2. Next, I included the following custom CSS code in the archive's custom CSS section:
( screenshot: hidden link )


.top-banner-row {
    display:none;
}

body.post-type-archive .top-banner-row {
    display:block;
}

This code hides that header banner section, unless it is being displayed on a 'post type archive' page.

As a result, the banner section from the archive shows on the 'Papers & Opinions' post type archive, but not on 'Category' and 'Tag' taxonomy archives.

regards,
Waqar

#2663177

Thank you Waqar, my issue is resolved now