How to disable a plugin for certain page?

I tried this (inserted into the function.php):

if( is_page( 799 ) ) {
  remove_action( 'plugins_loaded', 'bj_lazy_load' );
}

Not working...

Topic filters plugins Wordpress

Category Web


functions.php file is loaded after the plugins_loaded hook is fired. So you are (probably) removing the hook, but it's already fired, so it doesn't really matter.

If you want to remove a hook, you need to know when the hook was added. Then you need to remove the action at a later time, but before that hook is fired.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.