Undefined property: WP_Query::$post

First of all post field of WP_Query is current post ID and not post object. But I don’t think you should use it before calling the_post() method. Normally you should do it in this way: $args = … $hometeams = new WP_Query( $args ); $teamishome = $hometeams->have_posts(); while ( $hometeams->have_posts() ) { $hometeams->the_post(); $scorehome = … Read more

Why wont this wp_query exclude certain pages?

A hardcoded array( 12, 31 ) is not the same as array($implode_pages). The earlier is equivalent to array( 0 => 12, 1 => 31 ) The latter is equivalent to array( 0 => ’12, 31′ ) $implode_pages = implode(‘, ‘,array_keys($pages, 1)); makes $implode_pages a string – which is not what you want. Not only that, … Read more

Using $paged redirects /page/2 to page 1

If anyone comes across this issue, you can add this to your functions.php code add_filter(‘redirect_canonical’,’pif_disable_redirect_canonical’); function pif_disable_redirect_canonical($redirect_url) { if (is_singular()) $redirect_url = false; return $redirect_url; } Source

WP_Query with multiple meta fields filter?

You can not query for multiple meta fields using meta_key and meta_value parameters, you have to use meta_query parameter. Using multiple meta_key and meta_value parameters will use only the first found pair, that is why in your code the condition about “offer_type NOT LIKE deal” is ignored. So, the correct query should be: $args = … Read more

Can’t get drafts with WP_Query using post_status parameter

Try passing it as an array. For example $args = array( ‘p’ => 1234, ‘post_type’ => ‘any’, ‘post_status’ => array(‘draft’) ); Or for all types $args = array( ‘p’ => 1234, ‘post_type’ => ‘any’, ‘post_status’ => array(‘publish’, ‘pending’, ‘draft’, ‘auto-draft’, ‘future’, ‘private’, ‘inherit’, ‘trash’) );

Get List of all the Authors

You can display author’s list by using function wp_list_authors for more info : http://codex.wordpress.org/Function_Reference/wp_list_authors And for author Template Hierarchy see below link http://codex.wordpress.org/Author_Templates

Refine/Filter WP_Query Posts with jQuery or Ajax

I think what you might be looking for is combination of a plugin like https://wordpress.org/plugins/query-multiple-taxonomies/ and hooking into pre_get_posts if you are looping a list of posts. That plugin is in use on http://theboatworksnews.com/ so you can play with the projects section/filters and see if that matches what you’re looking for.