Why my query is not “Main_query”?
And the anwser to my question: Don’t make new WP_Query object. Don’t try to overwrite main query. Use global $wp_query; In my example the function should be like this: public function askanban_display_board(){ global $wp_query; $wp_query->set(‘post_type’, ‘ticket’); $wp_query->set(‘posts_per_page’, -1); $posts = $wp_query->get_posts(); print_r($posts); }