Filter query based on date in custom field

You can use this format of meta_query, although you’d have to change the format of all of your existing expiry-date entries. ‘meta_query’ => array( ‘key’ => ‘expiry-date’, ‘value’ => array($today, $UserInputExpiry), ‘compare’ => ‘BETWEEN’, ‘type’ => ‘DATE’ ) The second date in the array is the later date and both $today and $UserInputExpiry should be … Read more

Custom search (wp query by custom fields)

Found the problem – i was using array, when i just needed to use such arguments: $args = array( ‘post_type’=> ‘post’, ‘paged’ => $paged, ‘posts_per_page’ => 9, ‘meta_key’ => ‘summary’, ‘meta_value’ => $thesearch, ‘meta_compare’ => ‘LIKE’ ); Thanks for help guys.

Term specific featured post on taxonomy archive pages

The way to go would be to create an archive template for your taxonomy. Then you can catch the term requested with a function like get_queried_object(). So now you can do a custom WP_Query querying for both your term and your meta ‘featured’ Hope that makes sense http://codex.wordpress.org/Class_Reference/WP_Query http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display