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!
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
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.