Hot answers tagged


the first request don't show any custom post type (polylang_mo is a custom post type) polylang_mo is a private custom post type so unless I explicitly request this post type, it won't be included. the second request shows only 1 page (instead of 3) Polylang was actually filtering the results. Adding --skip-plugins=polylang makes the 3 posts ...


The solution is to use: 'taxonomy' => 'meal', 'field' => 'slug', 'terms' => 'breakfast' The taxonomy and terms are obvious, but why does field have to be slug? When you add taxonomy parameters, you can specify what 'breakfast' is-- via the field. It could be the term's ID, the full name, or slug. See the codex on Taxonomy Parameters


You are setting null to $wp_query then querying get_query_var( 'paged' ) this is expected that you will get this error! First query get_query_var( 'paged' ) then set the original $wp_query to null Example:- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; global $wp_query; $temp = $wp_query; $wp_query = new WP_Query( ...

Only top voted, non community-wiki answers of a minimum length are eligible