is_singular()函数在mu-plugins中不起作用

I am not able to selectively disable plugins in mu-plugins folder using the is_singular() functions in a conditional. It works with functions such as is_user_logged_in etc..

But i need to disable plugin for posts hence trying the is_singular() but again it does not work in mu-plugins on a multi site, even if I declare the blog id.

I also tried many version such as 'post' == $post->post_type still no luck. Any ideas for a working conditional in muplugin for multisite to check for post types? Thanks

is_singular() conditional tag checks if a singular post is being displayed, which is the case when one of the following returns true: is_single(), is_page() or is_attachment(). If the $post_types parameter is specified, the function will additionally check if the query is for one of the post types specified.

True when viewing a post of the Custom Post Type portfolio.

is_singular( 'portfolio' );

Try to add custom post type in condition.