Skip Navigation

[Resolved] Display of page title on Taxonomy Archive page: inconsistent results

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

Problem:

Display category title in category archive page.

Solution:

In the WordPress Archive page, you can display current archive page title with shortcode [wpv-archive-title], see our document:

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-archive-title

This support ticket is created 3 years, 2 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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by webD-3 3 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1966073

Member directory for a Chamber of Commerce website:
hidden link

In the left sidebar there are links to all the Categories. (Taxonomy: "Directory Category").

For all but 3 of these links, the page title in the gold bar displays the proper Directory Category. But for 3 specific pages, the page title displays a comma-separated list that appears to represent the correct category AND ALSO another category that one of the Members belongs to.

The three links:

hidden link
(page title shows "Agriculture, Shopping & Specialty Retail")

hidden link
(page title shows "Personal Services & Care, Wedding & Event Rental")

hidden link
(page title shows "Personal Services & Care, Wedding & Event Rental")

This site was created in 2017 and I believe that everything worked properly at that time. This issue was only noted by the client recently.

I am using Toolset Layouts on this site (you were recommending this back in 2017) and the shortcode I'm using is:

<h1 id="page-title">[wpv-post-taxonomy type="directory-category" format="name"]</h1>

If all the pages were demonstrating the problem I might try to find a better solution. But since this is only happening in very few instances, and is inconsistent (the "Shopping & Specialty Retail" page does not display "Agriculture") I wanted to check with support to see if you had any ideas. I'll be glad to provide more details, just wanted to provide the basic background initially.

Thank you for your help!

#1966399

Hello,

In the WordPress Archive page, you can display current archive page title with shortcode [wpv-archive-title], see our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-archive-title

The shortcode [wpv-post-taxonomy] is for displaying current post's taxonomies:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-taxonomy

#1967029

Luo, thank you very much. Using the [wpv-archive-title] shortcode resolved my problem.

With your explanation, I now understand what was happening, which is that the title was displaying the categories of the first member listed. Most Directory members only have one category, but there are a few that are in two categories, and in the cases where those members were first in the sort, the additional categories were shown. Those conditions just did not exist until more recently when new members, with multiple categories, that were first alphabetically in a category, were added.

Thanks again for your time and the solution.

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