Skip Navigation

[Resolved] Rename and style wordpress archive title – Toolset

This thread is resolved. Here is a description of the problem and solution.

Problem:

I would need to use wordpress archive title instead of native toolset title for SEO purpose.

Solution:

In most cases, the archive page title is defined in your theme file, you can find and edit your theme files, and remove them。

For example:

https://toolset.com/forums/topic/rename-and-style-wordpress-archive-title-toolset/#post-2131329

Relevant Documentation:

https://toolset.com/course-lesson/creating-a-custom-archive-page/

This support ticket is created 3 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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/Hong_Kong (GMT+08:00)

This topic contains 10 replies, has 2 voices.

Last updated by pramodk-2 3 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2131137
Archive Title - Three.png
Archive Title - Two.png
Archive Title - One.png

Hi Team,

I would need to use wordpress archive title instead of native toolset title for SEO purpose.

Below are used in the website.

Post type - Rooms
Taxonomy - Property Cities
Taxonomy - Property Areas

I would need to be rename the wordpress archive title as below.

Titles:

Archives: Rooms => Rooms (Remove 'Archives:' in the Title)
Property City: Bangalore => Room for rent in Bangalore ('Rename Property City:' To 'Room for rent in' )
Property Area: Adugodi => Room for rent in Adugodi ('Rename Property Area:' To 'Room for rent in')

Style:

All these wordpress archive tiles are left aligned and need to be centre aligned with some tweaks to wordpress archive description.

Added the images for references.

Thanks,
Pramod

#2131329

Hello,

In most cases, the archive page title is defined in your theme file, you can find and edit your theme files, and remove them, see WP document:
https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-post-types
https://developer.wordpress.org/themes/basics/template-hierarchy/#custom-taxonomies

Then follow our document to setup Toolset WordPress Archives, and display different archive title for each WordPress Archive:
https://toolset.com/course-lesson/creating-a-custom-archive-page/

#2131479

Hi Luo,

I'm not very good at coding.

Is there any code snippet (to add in Custom Code) that would suggest ?

I have done enough investigation but could not find a way on my own. Please suggest.

Thanks,
Pramod

#2131989

It depends on your theme files, please provide a test site with the same problem, fill below private message box with test site credentials + FTP/SFTP access, also point out the problem page URLs, I need a live website to test and debug.

#2132189

I have tried the credentials you provided above, it is not valid, I get below error message:
Error: The password you entered for the email address roomocc****@gmail.com is incorrect.

Please check it, make sure it is a valid admin account.

#2133465

Thanks for the details, I can login into your website, will update here if find anything

#2133485

Since you are using Astra theme, you don't need to edit your theme files, there is a built-in option to disable the archive page title, for example, Dashboard-> Toolset-> WordPress Archives, edit item "Rooms for rent":
hidden link
in section "Theme options (Astra)", there is a field "Archive Title", you can choose option "Disable".

See the result here:
hidden link

If you want to display different titles for each archive page, you can create different Toolset WordPress Archives, and setup different archive title manually.

More help:
https://toolset.com/documentation/recommended-themes/using-toolset-with-astra-theme/

#2133687

Hi Luo,

I know that there is an option to disable the word press default archive title in astra theme settings.

At the moment, there are nearly 160 areas in 'Property Areas' taxonomy and 3 cities in 'Property Cities'.
It is not possible to create archive pages with different titles for these many...

I would need the below changes to be made for the SEO purpose.

Property City: Bangalore => Room for rent in Bangalore ('Rename Property City:' To 'Room for rent in' )
Property Area: Adugodi => Room for rent in Adugodi ('Rename Property Area:' To 'Room for rent in')

Can you please suggest a custom code to rename Property City:' To 'Room for rent in' and 'Property Area:' To 'Room for rent in' ?

Once these are renamed then it will change the title for all these pages like below.

Property City:
Room for rent in Bangalore
Room for rent in Chennai
Room for rent in Hyderabad

Property Area:
Room for rent in Gachibowli
Room for rent in Adugodi
Room for rent in Adyar
.
.
.
......etc.,

Thanks,
Pramod.

#2134305

You can try [wpv-conditional] shortcode:
1) Check the current archive page title [wpv-archive-title] value,
2) Then output something else

See our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-conditional

But in your case, it will be still a very long codes.

#2134645

Hi Luo,

It is not ideal to give those many conditions, please let me know whether there is any alternative.

Can you please suggest to rename as below:

Property City: Bangalore => Room for rent in Bangalore ('Rename Property City:' To 'Room for rent in' )
Property Area: Adugodi => Room for rent in Adugodi ('Rename Property Area:' To 'Room for rent in')

Can you please suggest a custom code to rename Property City:' To 'Room for rent in' and 'Property Area:' To 'Room for rent in' ?

Thanks,
Pramod

#2135341

My issue is resolved now. Thank you!

Found the solution in the below link
https://developer.wordpress.org/reference/functions/get_the_archive_title/