Home › Toolset Professional Support › [Resolved] How to display sub childs of main taxonomy on archive page?
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 22 replies, has 2 voices.
Last updated by aS-10 2 years, 5 months ago.
Assisted by: Minesh.
Tell us what you are trying to do?
I am designing a WordPress archive page of a custom taxonomy which is linked to products.
and I want to display the description and sub childs of this custom taxonomy just before the archive grid.
The closest example of what I am trying to create is this - see screenshot.
If you can advise, how can I display the description and sub childs of the main taxonomy, then from that point, I would be able to customise the page the way I want.
Thanks.
Hello. Thank you for contacting the Toolset support.
As taxonomy views are not supported with blocks, you will have to create taxonomy view in legacy (classic) mode. To create a view in classic mode you can enable it by following the steps given with the following link:
- https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/
To display the child terms belongs to current taxonomy (term) archive:
- You should try to create a taxonomy view and set this view to query your taxonomy (for instance) "Books"
- Add the query filter " Taxonomy parent" filter and select the option " Parent is the term of the current taxonomy archive page"
- within the loop editor you should add the thing you want to display for child terms
- add this view using the "Fields and Text" block as the place where you want
I hope above solution will help you to resolve this issue.
Okay, so after hours of hit and trial, I was able to create a view of taxonomy and also display childs.
Currently, it looks like this on my site - hidden link
However, there are still a few things that I need to consider
1) How can I display the count number just next to the title?
2) How can I add a link to the image thumbnail?
3) In fact, how can I put each unit inside a box and achieve styling like this? - hidden link
http://www.abc.com
Glad to know that you went through those steps and know how Toolset works.
Can you please share problem URL where you want to display the child view and admin access details.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.
I don't understand why you need admin for the site.
Did I understand correctly, that you will create a sample view which looks like this? - hidden link
That would be highly appreciated.
Once you create a sample and explain me how you built it, from that point, I can reverse engineer and better build the site with your toolset.
Here is the sandbox site and you can auto-login to it using the following link:
- hidden link
I've created the following taxonomy view that will display the child terms for specific parent term:
- hidden link
Where:
- I've added the view that show the total post count
And following view that will display the total post count for the specific term:
- hidden link
Where:
- notice the Query filter added at "Query Filter" section as taxonomy filter: Select posts with taxonomy: Product categories set by the parent Taxonomy View
- the total post count is displayed using the shortcode [wpv-found-count]
- if no posts found you can check I've added the 0 under shortcode [wpv-no-items-found]
More info:
- https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#vf-155378
You can check on frontend:
- hidden link
You can output and design your view and add border by adding custom CSS to custom CSS box as required.
Thank you for creating the views and sending me a front-end demo as well. It sounded encouraging that I might be able to create what's on my mind with toolset.
1) Okay, Can you please tell me how you managed to write that code as seen in the attached screenshot? Did you write it or is there a way to select shortcodes and drop in the code editor?
2) Can you provide more details on how can I replicate and create that on my end?
3) I understand that you created multiple views to display this. But how can I wrap the "count" and "taxonomy title" and "thumbnail" inside ONE big view so that it looks like this - hidden link
4) Moreover, the above link also has a toggle option to expand it if there are many children! and it BEHAVES as an expandable object on Desktop and slider on mobile. You can check the link live here - hidden link
1) Okay, Can you please tell me how you managed to write that code as seen in the attached screenshot? Did you write it or is there a way to select shortcodes and drop in the code editor?
==>
When you will create the view - it will offer the blank template with all those shortcodes. I just added the shortcode [wpv-found-count] just before the <wpv-loop>.
- You can create taxonomy view - I think you already created.
- Then you should create another view "post view" from Toolset => Views and select the post type you want to display for which you want to display the post and add the query filter from the "Query Filter" section for your taxonomy: (in my case the taxonomy is "Product Categories":
--- notice the Query filter added at "Query Filter" section as taxonomy filter: Select posts with taxonomy: Product categories set by the parent Taxonomy View
--- Then add the shortcode [wpv-found-count] just before the <wpv-loop> and save this view
--- check mark the checkbox "Disable the wrapping DIV around the View" at bottom of the this "post view"
- Then refresh your taxonomy view you created at first step and use the "Fields and Views" button to add the post view you created on 2nd step where ever you want to display the post count.
2) Can you provide more details on how can I replicate and create that on my end?
==>
I already shared above. Please check the following Doc how you can display loop items in columns:
- https://toolset.com/documentation/legacy-features/views-plugin/view-layouts-101/
3) I understand that you created multiple views to display this. But how can I wrap the "count" and "taxonomy title" and "thumbnail" inside ONE big view so that it looks like this - hidden link
==>
The "thumbnail" belongs to taxonomy view so it should be added to taxonomy view as you can see with my taxonomy view:
- hidden link
You can see how the taxonomy image is linked:
<a hre="[wpv-taxonomy-url]">[wpv-woo-productcategory-images output="img_tag"]</a>
4) Moreover, the above link also has a toggle option to expand it if there are many children! and it BEHAVES as an expandable object on Desktop and slider on mobile. You can check the link live here - hidden link
==>
There is no such feature available, you can achieve this by adding the custom JS code or maybe you can use bootstrap.
=> hidden link
But this is the another question - we entertain only one question per ticket. This helps other users searching on the forum as well as help us to write correct problem resolution summery for the original issue reported. Please kindly open a new ticket with every new question you may have. Thank you for understanding.
Alright. I appreciate your answers. However, I would suggest that you could include screenshots and micro screen recordings to support your writing, it would be much helpful.
I had to read 4-5 times your entire message to grasp the context and technical points.
1) Okay, can you tell me how to make these thumbnails clickable to their relevant category page?
Here - hidden link
2) Also, the bootstrap option is disabled for me. I don't know what option to enable. This is the theme I am using - hidden link
See 2 screenshots attached.
3) And, I will create another ticket for that toggle feature
1) Okay, can you tell me how to make these thumbnails clickable to their relevant category page?
Here - hidden link
==>
There was a typo . You can use the following way to make the thumbnail clickable.
<a href="[wpv-taxonomy-url]">[wpv-woo-productcategory-images output="img_tag"]</a>
2) Also, the bootstrap option is disabled for me. I don't know what option to enable. This is the theme I am using - hidden link
See 2 screenshots attached.
==>
You can set the option "Toolset should load bootstrap 4" option and then the bootstrap option will be enabled.
Please let me know what screenshot/video of what section you want.
I want a screen recording of how you added this line -
[wpv-woo-productcategory-images output="img_tag"]
This is how the code looks on my side for creating subchilds - Screenshot attached.
This is how the code looks on your side for creating subchilds - hidden link
Can you record the screen while creating the above view again? Because my code seems to be different from yours.
Here is the screenrecording from my side - hidden link
1) I don't see the thumbnails being clickable.
2) The title of the taxonomy is not below the thumbnail as shown in your example. How can I do that?
Here is the screen recording: hidden link
Please let me know if you need further assistance.
Can you please wrap the clicable image code with the div tag - for example:
<div> <a href="[wpv-taxonomy-url]">[wpv-woo-productcategory-images output="img_tag"]</a> </div>
As you can see I've wrap the clickable image code with the div tag. Can you do that - that should help you to solve the issue.
Yes, it works now. Thanks!
1) So everytime, I share links here, is it private between toolset support and me? OR toolset support and all paid customers?
2) Over the weekend, I have concluded that there can be a different and better workflow in order to achieve this with toolset. Do you mind me doing a screen recording and posting it in this ticket or should I create another ticket from where you can pick up? It would be great if the new ticket is picked by you so I won't have to explain everything to the new staff. And, also I should appreciate you did great job in assisting on this ticket. Thanks.