Custom field and category query

For multiple category handling you need either category__in or a tax_query, for multiple custom fields you use meta_query. The various options for both of these are covered in the WP_Query codex page. $args = array( ‘posts_per_page’ => 10, ‘category__in’ => array( 163, 165 ), ‘meta_query’ => array( array( ‘key’ => ‘a_field’, ‘value’ => array( 1, … Read more

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

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)