Sauter la navigation

[Résolu] Show name singular instead of post slug in post type query

This support ticket is created Il y a 2 années et 2 mois. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par Marcel Il y a 2 années et 2 mois.

Assisté par: Minesh.

Auteur
Publications
#2574183

Hi,

I've added a single field quering the post type in a view, but that shows the post type slug. I would rather have it display the post type's "name singular", since I can edit that in Toolset's settings. Can't edit the slug for pages and posts.

See this video for clarification: lien caché. The red marked slug is what shows now, and the green marked name singular is what I want to show.

#2574821

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Instead of using the single field block - Can you please try to add the shortcode's or "Fields and Text" block and to that you should add the following shortcode:

[wpv-post-type show="single"]

More info:
=> https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-type

#2574863

My issue is resolved now. Thank you!