WordPress theme Flatik: Bug fixing for WP 4.5

Like presumably many other website publisher I buy themes from ThemeForest. Usually those themes are of a high quality for a very low price. Most of them include updates (at least for a certain time). However, I purchased the theme Flatik for WordPress some years ago which is not supported any more. Even worse, the developers quit their business – at least they cannot be found with their original name AdaptiveThemes.

Since some WordPress’s and third-party plugins’ updates broke quite a lot functions I tried to fix them. I want to share the fixes with you since you might face the same problems. If you found other solutions I would be happy to hear.

After WP 4.5 JQuery updates theme and necessary plugin scripts are not working any more (e.g. mobile menu)

jquery.js:2 Uncaught Error: Syntax error, unrecognized expression: body [href^=#]

JQuery throws an exception which originates from the plugin adaptive-shortcodes that is used by Flatik and Visual Composer. So, deactivating the whole plugin will fix the javascript problem but disable many necessary shortcodes as well. Imho it is sufficient to uncomment lines 71-73 in file sc-script.js or to modify it in other ways.

$('body [href^=#]').click(function (e) {

Images in Visual Composer

Some shortcodes provided by the Flatik or the plugin Adaptive Shortcodes respectively are buggy. For instance, it is not possible to insert an image of type framed_image with VC. The call of the save function does not work. Since I had not the time to figure out why this is not working I re-enabled the image type vc_single_image provided by VC itself.

It is deactivated in the file removals.php of the plugin Adaptive Shortcodes. After commenting out the line  wpb_remove('vc_single_image'); the single image is selectable as content type in VC. It works fine and does not look bad since VC provides some basic CSS formatting as well.