Query within a query in a loop
-
Hi guys,
I want to return posts in a loop which I have already done using the code below:
$args = array( 'post_type' => 'company_listing', 'cat' => get_query_var('cat'), //'meta_key' => 'featured', //'order_by' => 'yes' ); $loop = new WP_Query( $args );
Now I want to prioritise the posts depending on the meta key featured. If it is checked on the post, the post must appear first on the website = you know, that VIP treatment is what I am talking about here.
How will I write a WP_Query?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query within a query in a loop’ is closed to new replies.