wp_query with parameters
Assuming you have variables to hold your custom values for each: $category $tag $author $search Then just create an arguments array, and add keys to it conditionally: $custom_query_args = array( // Set any default args here // NOTE: This is where you’d add // things like pagination (posts_per_page), // order/sort parameters, and the like ‘posts_per_page’ … Read more