Hey hope everyone is having a great Friday. I’ve been trying to figure out how to sort my results with featured first followed by other listings under the category selected. I was looking at some previous post that said to include this into a php file. I’m trying to figure out exactly where to put this code in the file because I’m not getting this to work. I would like to sort by featured first under the category. Also is there a way to have my categories set up in a check box type format to choose from for my search?
add_action(‘geodir_before_listing’,’_my_listings_top’);
function _my_listings_top(){
global $wp_query;
$current_term = $wp_query->get_queried_object();
$cat_id = isset($current_term->term_id) ? $current_term->term_id :”;
$post_type = geodir_get_current_posttype() ? geodir_get_current_posttype() : ‘gd_place’;
echo “<h3>Featured listings</h3>”;
echo do_shortcode(‘[gd_listings post_type=”‘.$post_type.'” layout=5 category=”‘.$cat_id.'” post_number=”4″ list_sort=”high_review” show_featured_only=1 ]’);
}