Display Categories based on certain condition
-
In my feverish efforts in working with this plugin, I was wondering if there is a way to only show certain categories based on a condition. I have some code that works similar to the Featured Listings widget, except that it’s hard coded into one of the template files. Essentially what it does is show the Featured Listings. I’d like to show the category as well.
<?php // Get all listings that are featured listings $listings = get_posts(array( 'post_type' => WPBDP_POST_TYPE, 'meta_query' => array( array('key' => '_wpbdp[sticky]', 'value' => 'sticky' ) ) ) ); // Iterate through results $featured_listings_length = count($listings); $iteration = 0; while($iteration < $featured_listings_length) { $event = $values[$iteration]; $iteration++; } ?>
https://www.ads-software.com/plugins/business-directory-plugin/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Display Categories based on certain condition’ is closed to new replies.