Arconix FAQ is a very nice FAQ plugin useful for any WordPress site. It has a good developer support too.
While optimizing my site for better speed in PageSpeed Insights I’ve noticed that when Autoptimize was switched on for my site, the FAQ page became broken.
Autoptimize is a famous plugin to minify CSS and JavaScript and to optimize their delivery in templates.
I had to add arconix-faq.css
into my list of files excluded from optimization in Autoptimize plugin’s settings.
Still it was listed in PageSpeed render-blocking files after that. Together with another file added by the FAQ plugin, linked to //ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css?ver=1.11.4
After adding this code into wp-config.php
I was able to remove it from Autoptimize exclusions list.
define('AUTOPTIMIZE_INIT_EARLIER', true);
I didn’t find any use of jquery-ui.min.css
on my FAQ page, it is probably used in Accordion Mode only, and I don’t use accordion. This file can’t be included into my optimized and minified CSS file by Autoptimize, since it is linked to Google CDN by the FAQ plugin in includes/class-arconix-faq-admin.php
.
So in plugin’s support treads I’ve found this code for removing this file from head
via my child-theme functions.php
.
// remove jquery-ui css from arconix faq
add_filter( 'pre_register_arconix_faq_jqui_css', '__return_false' );
After removing jQuery UI CSS file, I’ve also disabled early initialization for Autoptimize plugin and arconix-faq.css
still played nice with other optimized scripts.
I hope in the next FAQ version these problems would be resolved by the author.