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

WP SITES

2784

Original Genesis Tutorials & 6000+ Guaranteed Code

Snippets

  • Consultation
  • Full Access
  • Log in

3 Ways To Exclude Products From WooCommerce Related Products

This download folder contains 3 code snippets which enable you to exclude or remove WooCommerce products from your Related Products list. You can exclude by :

  1. Product ID
  2. Category Slug
  3. Key

You might want to use this code to remove “Out of Stock” products from your related products list unless you’re offering them on back order.

What Are Related Products

Related Products are products that share the same tags or categories as the current product. They are not the same as “Up-Sells” or “Cross Sells” which you add manually in Product Data – Linked Products.

Installation

Copy & paste ( without the opening PHP tag ) one or more of the snippets to the end of your child themes functions file or custom functionality plugin.

Download Folder

Bonus

A 4th method has been tested and added to the latest download folder.

WooCommerce

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags