WP_Query: How to get results from both meta_key options?

You can put your meta_query in a variable to achieve the desired result. Then you can fill the variable with your actual meta_query when your condition is met. Check out the code below. $meta_query = array(); if ( isset($_GET[‘scope’]) && !empty($_GET[‘scope’]) ) { $meta_query[] = array( ‘key’ => ‘name’, ‘value’ => $_GET[‘scope’], ‘compare’ => ‘=’ … Read more

Previous / Next Links For Custom Post Type Sorted By Meta_Value

I was hoping for a nice and clean solution already existing within WordPress, but I didn’t have the time for someone to give it to me, so I created my own pagination routine I put into the functions.php of the theme and call it from the single-auction.php template… function my_pagination($currentID){ $args = array( ‘post_type’ => … Read more