How to stick custom post at the top in search results
A simple hack. Edit: putting the featured post ids in an array and checking that array in the main loop. global $post; $post_IDs = array(); foreach($post_info as $post_info_obj) { $post_IDs[] = $post_info_obj->ID; } $featured_IDs = array(); $query1 = new WP_Query(array(‘meta_key’=>’sticky’,’meta_value’=>’featured’,’post__in’=>$post_IDs)); while($query1->have_posts()) { $query1->the_post(); $featured_IDs[] = $post->ID; get_property_info_li($post); } First thing do to in the main … Read more