Tell us what you are trying to do? Trying to rename "archive" to "news" or any other categorie, but I couldn't find the answer/solution in your training guides. What can I do? I use "Ample Theme".
hidden link
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Hello. Thank you for contacting the Toolset support.
I see you are not using the Toolset to build the Archive.
What if you try to add the filter "get_the_archive_title" to get the current archive title:
- https://developer.wordpress.org/reference/functions/get_the_archive_title/
Hi, thanks.
How can I use Toolset to build the Archive automatically?
Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Well - you can create the archive but it will not handle the archive title as its coming from the theme.
If you just want to change the archive title then I should suggest you to use the filter I shared to change the archive title.
If you rebuild the archive - please check the following Doc:
- https://toolset.com/course-lesson/creating-a-custom-archive-page/
Hi,
I double checked the "news" category and I've built it with Toolset. See Screenshot.
But how can I rename it?
Hello there! Minesh is on vacation for a couple of days. If you don't mind, I'll continue with you on this ticket.
As Minesh has explained the word archive in the following screenshot comes from the theme and not from the archive template.
hidden link
If you want to customize the title of the archive, you will need to use a 3rd party plugin or custom code. Plugins such as the following may help:
- https://wordpress.org/plugins/custom-archive-titles/
- https://wordpress.org/plugins/archive-title/
Or you can use custom code, such as the following to change the word "Archive" into "News":
add_filter( 'get_the_archive_title', function ( $title ) {
return "News";
});
Check this article on how to add custom code https://toolset.com/documentation/programmer-reference/adding-custom-code/using-toolset-to-add-custom-code/
PS: Please note that the code that I shared will change all the archive titles(blog, author, taxonomies, post types, chronological, etc.)