I created a search filter that displays posts randomly, and I wonder how can I always display a specific post item in the first position of the search results and display the rest of the items normally.
Thank you for your help @dassoun, here is the query :
$taxonomies = array('recipe_type', 'product_category', 'recipe_category', 'recipe_event', 'recipe_diet');
foreach ($taxonomies as $taxonomy) {
$taxonomies_taxonomy[$taxonomy] = get_taxonomy($taxonomy);
$taxonomies_terms[$taxonomy] = get_terms(
array(
'taxonomy' => $taxonomy,
'hide_empty' => false,
'meta_key' => 'filter_order',
'orderby' => 'meta_value_num',
'order' => 'ASC'
)
);
$taxonomies_selected[$taxonomy] = (get_query_var($taxonomy)) ? get_query_var($taxonomy) : '';
}