Why always one post missing

It sounds like you have a filter running on that page that’s adding an offset parameter to your WP_Query. There aren’t any really easy ways to search for all filters. The plugin Hikari Hooks is the simplest that I’ve seen. If you install and activate that plugin and view the problem page, you should be … 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

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

Display posts from an array of ID’s

if you set the fields parameter to ids you will get an array of ids instead of unneeded post data ex: $ongoing_args = array( ‘post_type’ => ‘promotions’, ‘meta_key’ => ‘sp_ongoingPromotion’, ‘meta_value’ => 1, ‘fields’ => ‘ids’ ); $current_args = array( ‘post_type’ => ‘promotions’, ‘meta_key’ => ‘sp_endDate’, ‘meta_value’ => date(“Y/m/d”), ‘meta_compare’ => ‘>=’, ‘orderby’ => ‘meta_value’, … Read more