Tagged: x
-
AuthorPosts
-
September 20, 2016 at 1:46 pm #1183518
barmenterosParticipantHi there,
We’ve added the following code to ‘functions.php’ in order to defer loading of JavaScript and improve our site speed:
// Defer Javascripts // Defer jQuery Parsing using the HTML5 defer property if (!(is_admin() )) { function defer_parsing_of_js ( $url ) { if ( FALSE === strpos( $url, '.js' ) ) return $url; return "$url' defer onload='"; } add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 ); }The above code works fine regarding eliminating render-blocking JavaScript from our site but it also removes ‘Slider Revolution’ from the top of our home page. See the enclosed image to see how our home page looks after adding the code. Right now the site is running without the code so you can check online how it looks normally.
Find below our info:
URL: http://barmenteros.com/
WordPress version: 4.6.1
X version: 4.6.2 (Running X – Child Theme – Version: 1.0.0)
Cornerstone plugin version: 1.3.2Kindly help us to fix this issue.
Thanks
September 20, 2016 at 2:38 pm #1183616
NicoModeratorHi There,
Thanks for writing in.
I could see your revolution slider upon checking your setup. It shows a video with a text with “we code metatraders solution”.
Please confirm if it is okay already if not, would you mind sharing us your admin credentials and FTP so we could check your setup closer.
Don’t forget to set it as private reply.
Thanks.
September 20, 2016 at 3:33 pm #1183672
barmenterosParticipantThis reply has been marked as private.September 20, 2016 at 8:54 pm #1184091
FriechModeratorHi There,
Thanks for the credentials, please edit your slider settings. Under the Problem Handlings panel, troubleshooting tab turn on the Put JS Includes to the Body option.
Hope it helps, Cheers!
September 21, 2016 at 1:37 am #1184231
barmenterosParticipantThanks but unfortunately it did not work. As you can see in the attached screenshot we turned on the ‘Put JS Includes to the Body’ option and the slider still doesn’t show. Even more we tried enabling ‘JQuery No Conflict Mode’ option with the same result. Any other suggestion? Best
September 21, 2016 at 4:34 am #1184358
ChristianModeratorPlease test the options available in Slider Revolution’s Global Settings (see attachment). If it still doesn’t work, you will need to seek assistance from a WordPress developer as this might get quite involved. You might want to contact our trusted partners who caters X setup and customization needs. Please see https://community.theme.co/custom-development/
Thank you for understanding.
September 24, 2016 at 9:17 am #1189105
barmenterosParticipantThanks for your advice although it did not help us to find the solution. We found that the key is not to defer ‘x-head.min.js’ so we added the following code:
// Defer Javascripts // Defer jQuery Parsing using the HTML5 defer property if (!(is_admin() )) { function defer_parsing_of_js ( $url ) { if ( FALSE === strpos( $url, '.js' ) ) return $url; if ( strpos( $url, 'jquery.js' ) ) return $url; if ( strpos( $url, 'x-head.min.js' ) ) return $url; return "$url' defer='defer"; } add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 ); }Hopefully it will help other users with the same issue. Best
September 24, 2016 at 10:36 am #1189136
ThaiModeratorGlad you’ve sorted it out.
If you need anything else, please let us know 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1183518 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
