Conflict with external js file
-
When I activate the plugin it generates a conflict with my functions file funciones.js, this does not happen with Yoast or Seopress
-
Hello @sermalefico
Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.
Can you please tell us which theme are you using and, if possible, provide us with the JS file you are mentioning so we can test on our end?
Looking forward to helping you.
I use Oceanwp theme, elementor pro.
I enqueue my file in wordpress. -> funciones.js with codesnipets
function modify_jquery() { if (!is_admin()) { // comment out the next two lines to load the local copy of jQuery wp_deregister_script('jquery'); // wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, '1.12.4'); wp_register_script('jquery', get_stylesheet_directory_uri() . '/js/jquery.min.js', false, '2.2.4'); wp_enqueue_script('jquery'); } } add_action('init', 'modify_jquery'); function my_assets() { wp_register_script( 'funciones', get_stylesheet_directory_uri() . '/js/funciones.js', array( 'jquery' ), true ); //wp_register_script( 'slick-animation', get_stylesheet_directory_uri() . '/js/slick-animation.min.js', '',true ); wp_enqueue_style( 'style-name', get_template_directory_uri() . '/assets/css/third/font-awesome.min.css'); wp_enqueue_script( 'funciones' ); //wp_enqueue_script( 'slick-animation' ); } add_action( 'wp_enqueue_scripts', 'my_assets' );I have an archive template that load a isotope portfolio whit a shortcode and when click in an item popup another template that include info items and a slickslider. The error only apear in this archive template. Is strange beacuse with another plugins is fine.
jQuery(document).ready(function($){ $('.slide-archivo').slick({ slidesToShow: 1, slidesToScroll: 1, lazyLoad: 'progressive', dots: true, infinite: true, nextArrow: '<button type="button" class="slick-next"><i class="fa fa-arrow-right"></i></button>', prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-arrow-left"></i></button>' }); // Custom click event - open fancyBox manually $(document).find('.slick-cloned a').removeAttr('data-fancybox'); $('.fancyboxy').on('click', function() { var visibleLinks = $('.fancyboxy:visible'); $.fancybox.open( visibleLinks, { //API options here hash: false, margin: [20, 60, 20, 60], baseTpl: '<div class="fancybox-container" role="dialog" tabindex="-1">' + '<div class="fancybox-bg"></div>' + '<div class="fancybox-inner">' + '<div class="fancybox-infobar">' + "<span data-fancybox-index></span> / <span data-fancybox-count></span>" + "</div>" + '<div class="fancybox-toolbar">{{buttons}}</div>' + '<div class="fancybox-navigation">{{arrows}}</div>' + '<div class="fancybox-stage"></div>' + "</div>" + "</div>", beforeLoad : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); }, afterLoad : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); }, beforeShow : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); }, afterShow : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); $("html").addClass('color_blue'); }, beforeClose : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); }, afterClose : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); $("html").removeClass('color_blue'); }, onInit : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); }, onActivate : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); }, onDeactivate : function( instance, current ) { $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); } }, visibleLinks.index( this ) ); return false; }); $(window).on('orientationchange', function() { $('.slide-archivo').slick({ slidesToShow: 1, slidesToScroll: 1, dots: true, lazyLoad: 'progressive', infinite: true, nextArrow: '<button type="button" class="slick-next"><i class="fa fa-arrow-right"></i></button>', prevArrow: '<button type="button" class="slick-prev"><i class="fa fa-arrow-left"></i></button>' }); $('.slide-archivo').slick("setPosition"); $('.slide-archivo').slick('resize'); }); function DropDown(el) { this.dd = el; this.placeholder = this.dd.children('span'); this.opts = this.dd.find('ul.dropdown > li a'); this.val = location.hash.substr(1); this.index = -1; this.initEvents(); } DropDown.prototype = { initEvents : function() { var obj = this; obj.dd.on('click', function(event){ $(this).toggleClass('active'); return false; }); obj.opts.on('click',function(){ var opt = $(this); obj.val = opt.text(); obj.index = opt.index(); obj.placeholder.text('Filtrar: ' + obj.val); }); }, getValue : function() { return this.val; }, getIndex : function() { return this.index; } } $(function() { var dd = new DropDown( $('#dd') ); $(document).click(function() { // all dropdowns $('.wrapper-dropdown-1').removeClass('active'); }); }); $('.dropdown li a').on('click', function() { $('.wrapper-dropdown-1').removeClass('active'); }); $(function() { $('.elementor-posts .elementor-post').addClass('activo'); }); $('.elementor-pagination').on('click', function() { $('.elementor-posts .elementor-post').removeClass('activo'); $('.elementor-posts .elementor-post').addClass('inactivo'); }); $(window).bind("load resize scroll",function(e){ var viewportWidth = $(window).width(); if (viewportWidth < 959) { $("#dd").addClass("wrapper-dropdown-1").removeClass("no"); $("#dd ul").removeClass("filters").addClass("nofilters"); } else if (viewportWidth > 959) { $("#dd").removeClass("wrapper-dropdown-1").addClass("no"); $("#dd ul").removeClass("nofilters").addClass("filters"); } }); });Hello,
What kind of error are you getting? Could you please share the screenshots or the screen recording of the error?
Also, please share the page URL where you are getting this error.
Looking forward to helping you.
Thank you.
-
This reply was modified 7 years, 2 months ago by
Suraj Vibhute.
Hello @sermalefico
Thank you for sending the link.
It seems like you are using a Portfolio Shortcode in the Meta Description which is causing the problem. Can you please add some original text in the meta description area or are you already using one?
Looking forward to helping you. Thank you.
Nothing. That’s not the problem. I have put meta description new and still giving the same error. yoast and seopress is fine. I think it’s a conflict with the Elementor template system and your self-generated meta-description of the content of the page.
Hello @sermalefico
Can you please open a new support ticket here so we can take a closer look as we are unable to reproduce the issue on our end?
https://community.mythemeshop.com/forum/23-rank-math-free/You can register for free from here:
https://mythemeshop.com/#signupLooking forward to helping you. Thank you.
Hello,
Since we did not hear back from you, we are closing this ticket.
Please feel free to open a new one if you need any further assistance.
We are here to help. Thank you.
-
This reply was modified 7 years, 2 months ago by
The topic ‘Conflict with external js file’ is closed to new replies.