Created
July 25, 2013 16:54
-
-
Save WazzaJB/6081661 to your computer and use it in GitHub Desktop.
This is a simple function which allows you to get featured products when using the Shopp plugin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function get_featured_products() | |
{ | |
global $wpdb; | |
$the_products = array(); | |
$products = $wpdb->get_results("SELECT product FROM {$wpdb->base_prefix}shopp_summary WHERE featured = 'on'"); | |
foreach($products as $product) | |
{ | |
array_push($the_products, shopp_product($product->product)); | |
} | |
return $the_products; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment