Skip Navigation

[Resolved] Display taxonomy items of specific post type in menu

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

Problem:
The issue here is that the user wanted to display all the taxonomy based on a Post Type. It should be noted that the taxonomy is shared across several post types.

Solution:

Unfortunately this is not possible because of the wordpress API doesn't separate the the Taxonomy based on post types but rather the posts types are linked to the taxonomies.

So a custom query would need to be done to retrieve all the Taxonomy Terms that are added to the Posts of this particular post type.

This support ticket is created 5 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by tomasP 5 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1339781

Hello,
I am trying to create a submenu ul>li (via Ubermenu widget in menu) that would display non-empty taxonomy term links of a specific post type. The taxonomy I am using is shared by several post types.
I have no problem to list all the term links from all the post types but that is not what I need. Is there a way how to acomplish this? I can create specific taxonomy with same values for each post type, but I would like to keep this solution only as the last resort.
Thanks very much in advance,
Tom

#1339975

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Tomas,

Thank you for getting in touch.

Any solution for this would require some custom coding to achieve to build this menu.

Unfortunately such custom coding would be out of the scope of our support forum. Perhaps you can contact the Ubermenu widget team to see if they perhaps have a solution for this one.

However anything else would require custom coding. The issue here is that your taxonomy is shared among multiple Post Types so some custom query would need to be done to do this since wordpress doesn't separate the taxonomies like this.

Thanks,
Shane

#1339981

Hello, Shane, thanks for your answer. So I will have to split up the taxonomies.