Skip Navigation

[Resolved] Create a taxonomy drill down. Parent->Child->Products->Detail

This support ticket is created 4 years, 8 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#1306963

Tell us what you are trying to do?
For the woocommerce section, I want to create a taxonomy based click thru to specific products

Example:
Parent
—Women's
—Men's
—Children

Child
—Women's
——T-Shirts
——Dresses
——Swim
—Men's
——T-Shirts
——Sweatshirts
——Shorts
—Children
——T-Shirts
——Sweatshirts

The user would land on the Parent Taxonomy, Choose a category like women than they will see the product child taxonomy like; T-Shirts, Dresses, etc, Click on Dresses and results would be all the dresses, Then click to Product Detail.

hidden link

#1307235

Hi, are you asking about creating this just as a menu interface, or are you asking about setting up a taxonomy archive that allows Users to drill down through the hierarchy of terms page by page, finally ending up at a page with only products in that term?

#1307295
flow.png

So users can drill down through the hierarchy of terms page by page Each page showing the category thumbnails, finally ending up at a page with only products in that term?

#1307315

Hi, it's a bit complex but the general idea here is you use a combination of WordPress Archives and Views. I helped another User implement something similar a while back, can you take a look at the following ticket?
https://toolset.com/forums/topic/how-to-create-different-taxonomy-archive-page-for-parent-child-taxonomy-terms/

It seems to be quite similar to me. How does this compare to what you want to achieve?

#1313593

Finally getting back to this project. One thing is puzzling me in this paragraph:

Create a View of Product Category Taxonomy Terms, filtered by term parent, where the term parent is set by the current archive.
In the Loop Output section of this View, insert a link to the term archive page.
Then insert this View in the WordPress Archive you just created, somewhere outside the wpv-loop tags.

How do I insert a link to the archive page? I tried [wpv-archive-link] and the view does not save, it errors.

#1313889
Screen Shot 2019-08-11 at 11.58.51 AM.png

You can use the wpv-taxonomy-link shortcode: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-taxonomy-link

Or just use the Fields and Views button, and you'll see "Taxonomy link" as one of the options (screenshot attached). The system will generate the proper syntax for you.

#1316291

So I'm pretty close but I have 2 issues. It seems like the utility function to get the hierarchical level of some hierarchical taxonomy term is also effecting the portfolio section — CPT using categories to display the art — and the other issue is that paging is not working. I made a video of the issues.

hidden link

#1316385

The automatic pagination provided by WooCommerce isn't going to be accurate in any term archive that also has child terms, since you're looping over taxonomy terms and not products. My suggestion is to hide that automatic pagination with CSS on any archive that loops over terms instead of Products. Then if you want to paginate the list of terms, you could add pagination to the View of terms - though I do not think it is necessary for a catalog of this size.

#1316389

I'm checking out the filter issue now, stand by.

#1316393

Okay I think I see the issue with the archive template filter. This part:

if( !$current_taxonomy || $current_taxonomy != 'product_cat' )
    return;

Should be replaced with:

if( !$current_taxonomy || $current_taxonomy != 'product_cat' )
    return $wpa_to_apply;

Please try that modification and let me know if the results are not more like you'd expect.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.