how change posts_status from published to any

in my website ( , i show attachment pages like a post, so i need to show inherit post_types in wpp query
i changed line 463 in Query.php file from this :
$where .= ” AND p.post_password = ” AND p.post_status = ‘publish’”;
to this :
$where .= ” AND p.post_password = ” AND p.post_status = ‘publish’ OR p.post_status = ‘inherit’”;

problem is : everytime i update the plugin i should change this line in plugin files, Is there a way to change this from theme functions file?

  • This topic was modified 4 hours, 54 minutes ago by ehsanmn.

The page I need help with: [log in to see the link]


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.

Your Advertisement Here