Multiple Custom Field Query

that should be fairly simple using Meta_Query parameter of the WP_Query object you can set the relation and set as many fields as you like: $args = array( ‘meta_query’ => array( ‘relation’ => ‘OR’, //realation array( ‘key’ => ‘color’, //first custom field ‘value’ => ‘blue’, ‘compare’ => ‘NOT LIKE’ ), array( ‘key’ => ‘price’, //second … Read more

Trying to output content from page, works locally but not online

have you tried get_page() ? $page_id = 123; // 123 should be replaced with a specific Page’s id from your site, $page = get_page( $page_id ); // You must pass in a variable to the get_page function. echo ‘<h3>’. $page->post_title .'</h3>’;// echo the page title echo apply_filters(‘the_content’, $page->post_content); // Get Content and retain WordPress filters … Read more

Pagination not working

See Pagination Parameters under WP_Query in Codex: Since WordPress 3.0.2, you do get_query_var( ‘page’ ) instead of get_query_var( ‘paged’ ). The pagination parameter ‘paged’ for WP_Query() remains the same.

Custom post type – filter content by custom meta box content

You can filter your query_posts() results by a custom meta field with the “meta_query” array and its corresponding subfilters. For more information check the WordPress codex on Custom Field Parameters. http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters An alternative method would be to setup the new filter variables in WordPress’ query_vars and use that instead of $_GET: http://codex.wordpress.org/Custom_Queries#Custom_Archives

Date not appearing in custom query

See the_date() in WordPress Codex for an explanation: SPECIAL NOTE: When there are multiple posts on a page published under the SAME DAY, the_date() only displays the date for the first post (that is, the first instance of the_date()). To repeat the date for posts published under the same day, you should use the Template … Read more