Autoptimize conflicts with WP Visual Composer
-
Hi Frank
Thanks for a great plugin it’s helped get my site up to a grade A on YSlow.
I’ve been using Autoptimize since my site went live a week ago.
I have Visual Composer (a drag and drop page builder) installed and came to use it last night for the first time since installing Autoptimize. The front end editor failed to open and the page hung with the VC icon constantly spinning.
I did a search and found this thread relating to a similar drag and drop editor – https://ww.wp.xz.cn/support/topic/autoptimize-conflicts-with-wp-beaver-builder?replies=10#post-6795187
I tried adding the ?ao_noptimize=1 to the URL but this didn’t work.
So I created a new plugin based on your autoptimize_helper.php.
First you load the page you want to edit and click on ‘Edit with Visual Composer’ this calls the front end editor like this:
http://example.com/wp-admin/post.php?vc_action=vc_inline&post_id=23&post_type=page
This is the code I used in the autoptimize_helper.php file based on the thread I linked to earlier.
add_filter('autoptimize_filter_noptimize','visual_noptimize',10,0); function visual_noptimize() { if (strpos($_SERVER['REQUEST_URI'],'vc_action')!==false) { return true; } else { return false; } }I activated the plugin, cleared the cache in Autoptimize and Hyper Cache and gave it a try. Unfortunately this didn’t work, assuming what I did was correct.
Can you offer any further advice as I would really like to continue using Autoptimze as I think it’s excellent?
Regards
Peter
The topic ‘Autoptimize conflicts with WP Visual Composer’ is closed to new replies.