Error when trying to use Canvas HTML with the latest version of Wordpress (4.5.2
5 replies · opened Jun 2, 2016
This is a HTML only template and not compatible with wordpress in any way, if you are trying to install as a theme on wordpress that's why you get the error. For wordpresss you can only use a wordpress theme.
Of course I'm trying to adapt Canvas HTML templates to a custom wordpress theme.
The cause of the error is that wordpress latest version ships with jQuery v1.12.3 and Canvas uses v.1.11.3 and the following is a valid selector under 1.11.2:
$('.class a[href=#anchor]');
but it fails under 1.12.0 because requires the quotes:
$('.class a[href="#anchor"]');
See the bug
Of course I can do de-register the jquery file used by wordpress and enqueue the one that works with Canvas but I prefer the template author adapt the code to the latest version of jQuery.
Hello,
Please find the following code in the pageTransition: function() Function Block in the js/functions.js File:
linkElement : '#primary-menu ul li a:not([target="_blank"]):not([href*=#]):not([data-lightbox])',and replace it with:
linkElement : '#primary-menu ul li a:not([target="_blank"]):not([href*="#"]):not([data-lightbox]):not([href^="mailto"]):not([href^="tel"]):not([href^="sms"]):not([href^="call"])',This will definitely fix the issue. Let us know if we can help you with anything else or if you find any further issues.
Hello, we are having the same problem here, the Canvas support have forecast to update jquery version?
Hello @thiagobertoletti,
You Issue will resolved by using the above mentioned solution. Yes, we are updating the jQuery in the Next Update.
Do let us know if we can help you with anything else or if you find any further issues with Canvas.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard