How to Get Beaver Builder to Work With Autoptimize

WpFASTER Code 3 Comments

Having trouble getting Beaver Builder to work with Autoptimize? How Autoptimize works does conflict with how Beaver Builder works and vice versa. Neither plugin is ‘wrong’ in how each does what it does, per se, but you will need to somewhat alter the one to get it to work with the other. For the the easiest way to get Autoptimize and Beaver Builder to play nice try this: Copy and paste this code snippet — in plain text — to your functions.php file, or, add it with a plugin like Code Snippets.

add_filter('autoptimize_filter_noptimize','beaver_noptimize',10,0);
function beaver_noptimize() {
	if (strpos($_SERVER['REQUEST_URI'],'fl_builder')!==false) {
		return true;
	} else {
		return false;
	}
}

Comments 3

  1. Hi,
    thanks for code snippet, but it doesn’t work for me. I’m using BB plugin with Genesis Theme. I would appreciate your help 🙂
    Best regards,
    Damian

    1. Post
      Author

      Hey Damian,

      This snippet remedies the problem of not being able to add images via the Beaver Builder page builder when also using Autoptimize. Which is, as far as I know, the only incompatibility between those two plugins.

      Is that the issue that you used the snippet to try and fix or is it something else?

      Looking forward,
      Sam D.
      Senior Client Support Representative and Project Management Lead
      WpFASTER

Leave a Reply

Your email address will not be published. Required fields are marked *