WooCommerce – Get featured products IDs

Remi | August 29, 2013 | in Tutorials

And another great snippet that i coded today. It’s a function that creates an array of featured products IDs. That’s pretty useful if for example you want to quickly get only featured products IDs, or doing a condition (if has featured product then do that…). The function store all featured products IDs within a transient to avoid unwanted connections to the database. Simply place that code within your functions.php file:

The author

About the author Remi: Hey! My name is RĂ©mi Corson, i'm a WordPress Expert Developer, i create high level themes and plugins, and i provide free stuff every week on this website!

Leave a reply