Skip Navigation

[Resolved] Show product category and sub category

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)

This topic contains 5 replies, has 3 voices.

Last updated by Minesh 8 months, 1 week ago.

Assisted by: Minesh.

Author
Posts
#2687691

Hi there,

For my hierarchical categories I want to show the links of this category in the sidebar, so:
Categories: Country | only show the countries (link) hidden link
Sub categories: Province | only show the provinces (link) hidden link

Is this possible? And how can I realize this?

#2687791

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

I understand from the structure of your example links that you are using a hierarchical category for "locations", where the top level represents a country, and the next level represents an area within the country.

But I don't quite follow what it is you are asking for, based on these two links.

Could you please give a more complete description of what you need?

#2687954
provinces.png
countries.JPG

See the pictures attached.

So I only want to show all the countries (of the categories) by the countries.
And all the provinces by de provinces.

- country
- - provinces

Hope this is clear.

#2688073

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

To display hierarchical taxonomy terms - it will require two views. One view to query the parent term and another view to query child term.

Then we need to add child view that displays the child term in to parent view's loop output.

If you can share problem URL where you want to display hierarchical taxonomy terms and admin access details and tell me on that page how exactly the output should be displayed, Once I will review your structure I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2688594
Category filter.png

Hi Minesh,

I want create a dropdown like attached and I want to use the category links.
Is this possible?

For this page: hidden link

#2688604

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see that you want to have dependent dropdown feature such that when you select option from State dropdown it should show related cities with another dropdown. And dropdown can not have link.

Using one taxonomy it's not possible as to display dependent dropdown because to display dependent dropdown it should have parent/child relationship with post types. For example States and Cities.

With taxonomy - what is possible that we can display the terms in hierarchical structure with link for example:
- State 1
--- City 1
--- City 2
--- City 3
- State 2
--- City 4
--- City 5
--- City 5

To implement such functionality with dependent dropdown - you will have to create post types States and Cities and one-to-many post relationship between State (one) and Cities (many). You should check the following link for example:
- hidden link
Check “State” and “City” dropdowns.

More info:
- https://toolset.com/course-lesson/what-are-post-relationships-and-how-they-work/