• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2896

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Checkout

Remove Child Products From The Default Child Taxonomy Terms Template In WooCommerce

$50.00

Category: WooCommerce Tags: include_children, pre_get_posts, product_cat, tax_query
  • Description

This code enables you to modify the default product archive templates for any taxonomy including category & tags and any parent or child term archive in WooCommerce rather than using a custom loop.

In this case, the code removes children from specific parent product categories so only the parent products display and not products from other child categories in the hierarchy tree.

Installation

There’s only 1 step :

Copy and paste the PHP code to the end of your child themes functions file or custom functionality plugin.

Primary Sidebar

Guaranteed code

Written by Brad Dalton specialist for WooCommerce. Read More…

Advertise · WPEngine · Genesis · Log in

  • Code Snippets
  • Tutorials
  • Videos
  • Tags
  • Account
  • Checkout
  • Cart
  • Hire Me