Skip Navigation

[Resolved] Lister les catégories sans duplicate

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

Problem:
The user would like to list all the categories without being duplicated.

Solution:
The user has used a post's view instead of a taxonomy view. Check this reply https://toolset.com/forums/topic/lister-les-categories-sans-duplicate/#post-1843559

Relevant Documentation:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/

This support ticket is created 4 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: Africa/Casablanca (GMT+01:00)

This topic contains 2 replies, has 2 voices.

Last updated by stephaneM-4 4 years, 2 months ago.

Assisted by: Jamal.

Author
Posts
#1843255

Hello,

I have created a page where I would like to have a listing of the categories of my posts.
hidden link

So I created a view with the list of taxonomy I want.

The view is on this page but it displays the categories in duplicate as many times as there are posts in the category.

I don't know how to have only 1 link to the category.

Can I give you the admin url for correction?

Thank you

Thanks

#1843559

Hello and thank you for contacting the Toolset support.

I think that you have created a posts' view and you are trying to display the category for each post, right?
This way, you will have duplicate categories, because the view is querying posts instead of categories.

You will need to use a taxonomy view in order to get the list of categories directly, without going through a posts' view and each post on the view.

Unfortunately, taxonomy views are not yet implemented in the Blocks editor. So you will need to build it with the legacy editor using shortcodes.
To activate the legacy editor, go to Toolset->Settings->General->Editting Experience and activate both editors. Reload the page to get the new menu entry Toolset->Views. There, you can create a new view, and in the content selection section, choose taxonomies, then categories.

Then you can include the view inside of your Block-based page using a shortocde:

[wpv-view name="name or slug of the view"]

Read more about the shortcodes here https://toolset.com/documentation/programmer-reference/views/views-shortcodes/

I hope this helps. Let me know if you have any questions.

#1845645

My issue is resolved now. Thank you!