Updating to WordPress 4.5 made slider disappear
Error:
- WordPress got updated, usually to 4.5, and the sliders disappeared
Problem appeared in (but it could be in other plugins and themes too):
- Fixed Menu Anchor plugin
- Responsive theme By CyberChimps
- Point theme By MyThemeShop
- Artisteer themes
- FlyMag PRO theme
- Divi theme
- BuildMe theme
- WPEX-PRONTO theme
- Event Registration plugin
Solution:
Check your website in Chrome. Press F12, click on Console, and Refresh the page, where you have the slider disappeared. You will probably see a javascript error like this:
Error: Syntax error, unrecognized expression: a[href=#scroll-top]
And a path to jQuery. You should open up the arrow before this message to locate, where the real issue is happening:
it will be the file, which isn't jQuery, but something else. In it you will have a code starting with something like:
jQuery('a[href=#xyz]')
which was accepted in older jQuery-s, but it's not accepted in new ones. You should either just disable your plugin, but it might be a file from your theme, and you want to fix it. Then you should put " " signs around the # part, like this:
jQuery('a[href="#xyz"]')
and that will fix your problem. If your code looks a little bit differently:
$("a[href*=#]")it doesn't matter what kind of outer signs are you using, ' or ", you could simply replace those too:
$('a[href*="#"]')
So the key to solve this problem is to eliminate the not surrounded # tags.