WP Query Issues with version 6.0.2

[ad_1]

Just a heads up for anyone else with this issue, but after upgrading to version 6.0.2 of this plugin, I had multiple custom queries using WP_Query that I use in shortcodes which no longer worked. The queries were suddenly pulling in additional post types even though I was setting the post_type explicitly in my queries (and these bits of code have been working on my WordPress website for YEARS).

For instance, this code snippet suddenly pulled all my future events, followed by my ‘openings’ that I was expecting:

    $arg = array(
        'post_type' => 'openings',
        'posts_per_page' => 200,
        'orderby' => 'title',
        'order' => 'ASC'
    );

    $jobs_query = new WP_Query($arg);

In any case, ALL my querying problems of this sort were fixed by using the WP Rollback plugin to revert to version 6.0.1.1. So if you are having similar problems, I recommend this approach until the issue gets sorted out.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer