Skip Navigation

[Résolu] Remove page title for Archive Page

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
How to remove & replace word "Archives" from the taxonomy term archive page?

Solution:
To remove Archive Title from All archives, please add this code in your theme’s or child theme’s functions.php file:

add_filter( 'get_the_archive_title', function ($title) {
    return '';
});

OR if you want to remove Archive Title from some Specific archives only, then please add this code instead of above one:

add_filter( 'get_the_archive_title', function ($title) {
    if ( is_tax( 'book-authors' ) ) { // Change 'book-authors' to your Taxonomy slug
        $title = '';
    }
    return $title;
});

If you would like to show only Term Title or Term Name, please use shortcode as given in our doc at below link. Correct shortcode for this case would be like this:

[wpv-taxonomy-archive info="name"]

Screenshots here:
https://toolset.com/wp-content/uploads/2017/09/572715-wpv_taxonomy_archive.png?x62720
https://toolset.com/wp-content/uploads/2017/09/572715-Term_1.png?x62720
https://toolset.com/wp-content/uploads/2017/09/572715-Term_2.png?x62720

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive

This support ticket is created Il y a 6 années et 7 mois. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

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

This topic contains 4 réponses, has 2 voix.

Last updated by JorgeE7101 Il y a 6 années et 7 mois.

Assisted by: Noman.

Auteur
Publications
#572673

Hello.

How do replace (dynamically if possible) the word "Archives" at the top of the page by the taxonomy term? so, if you're browsing the page hidden link The page title would be Namibia.

I know how to insert the heading later with shortcodes, but I need to remove it first and my theme doesn't have the option to remove it. It has the option to remove the word "category" from category pages, but not from the Archives page.

I could use CSS to hide, but this doesn't help as I have it on the breadcrumbs as well.

Thanks very much.

#572692

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

Taxonomy_Slug.png

Hi Jorge,

Thank you for submitting the new ticket. To remove Archive Title from All archives, please add this code in your theme’s or child theme’s functions.php file:

add_filter( 'get_the_archive_title', function ($title) {
    return '';
});

----------------------------

OR if you want to remove Archive Title from some Specific archives only, then please add this code instead of above one:

add_filter( 'get_the_archive_title', function ($title) {
    if ( is_tax( 'book-authors' ) ) { // Change 'book-authors' to your Taxonomy slug
		$title = '';
	}
    return $title;
});

==> Whereas 'book-authors' in the above code will need to be replaced with your main Taxonomy Slug. Please see attached screenshot if you are unsure about the main Taxonomy slug.

These will remove Taxonomy Archive Title from your archive page. So that you can add them using View’s shortcode. You can add static text heading. OR you can use this shortcode [wpv-taxonomy-archive]:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-archive

Thank you

#572702

Hi Noman and thanks again. I've removed the archives word from the page. However, when I insert the short code

[wpv-archive-title]

it ends up like this:

Taxonomy: Europe

and if I use

 [wpv-post-taxonomy type="destino-viagem" format="name"] 

it outputs the parent and children taxonomy terms.

I need the heading to dynamic, it can't be static text. How do I remove that and have only "Europe" as per the taxonomy term?

Thanks.

#572715

Noman
Supporter

Languages: Anglais (English )

Timezone: Asia/Karachi (GMT+05:00)

wpv-taxonomy-archive.png
Term 1.png
Term 2.png

If you would like to show only Term Title or Term Name, please use shortcode as given in our doc at above link. Correct shortcode for this case would be like this:

[wpv-taxonomy-archive info="name"]

Please see attached screenshots for how to add this in WP Archive View and what it looks as end result.

Thank you

#572724

Fantastic! It's working now! Thanks a lot.

Le forum ‘Types Community Support’ est fermé à de nouveaux sujets et réponses.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.