Skip Navigation

[Resolved] Taxonomy hierarchy

This support ticket is created 4 years, 11 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
- 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 6 replies, has 2 voices.

Last updated by Minesh 4 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1426321

Hi, I am working on taxonomies and added some child taxonomies to parent taxonomies. Unfortunately, when displayed front-end child taxonomies are displayed in the same line as parent taxonomies, causing a complete clutter. It is not user-friendly for the customer at all. Is there a way to somehow distinguish child taxonomie from parent taxonomies for the user on front-end?

Or maybe there is a possibility to not create child taxonomies assigned to parents but instead create all taxonomies as parents but allowing the conditional logic to keep all the rest taxonomies (except the main one) hidden until the user selects to filter the items and then - based on the checkbox selected - show him conditionally the next taxonomy that he can filter deeper along the line.

Any of both ways are perfectly fine with me, or any other solution would be too.

hidden link

#1427079

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

As I understand, you want to display taxonomy filter with parent and child terms as checkboxes as per the parent/child hierarchy.

If this is true (considering you are using the classic view to build the view) - you can add the output="legacy" attribute to your taxonomy filter shortcode to display it in the hierarchy.

For example:

[wpml-string context="wpv-views"]Student Types[/wpml-string]
[wpv-control-post-taxonomy taxonomy="student-type" type="checkboxes" output="legacy" url_param="wpv-student-type"]
#1427525

Hi, thanks.
It really put taxonomies in position to abide the parent/child relationship within them, but unfortunately it additionally added bullets (just like in an unordered html list) just in front of all checkboxes. How can I delete them.
hidden link

#1427529

Minesh
Supporter

Languages: English (English )

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

You can add the following custom CSS to your view's "Search and Pagination" sections CSS box:

ul {
list-style:none;
}
#1427647

Thanks,
It deleted the markup.
Unfortunately, initially output="legacy" created markup and dragged the checkboxes to the right. Now when markup is gone, there is whitespace left on the left in their space. Could you kindly advise how to return all taxonomies back to the left removing the whitespace.

#1427651

My issue is resolved now. Thank you!

#1427663

Minesh
Supporter

Languages: English (English )

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

You should clear the left margin.

Please use the following CSS and remove the old one I shred in previous reply and add it to the same "Search and Pagination" sections CSS box:

ul {
list-style:none;
margin-left: 0px;
}