Skip Navigation

[Résolu] Display of page title on Taxonomy Archive page: inconsistent results

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

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

Marqué : 

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

Last updated by webD-3 Il y a 7 mois.

Assigned support staff: Luo Yang.

Auteur
Publications
#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

Luo Yang
Supporter

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

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.