Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thank you twykr, you are right! I’m actually using Divi!

    Thanks for the workaround. I will wait an official fix either from Elegant Themes or Yoast.

    Same problem here. It gives me error on Google Search Console.

    50bbx

    (@50bbx)

    Here is how I changed the code inside the popup.js inside the plugin folder to make it stay:

    (function($){
    $(document).ready(function(){
    	/* Check document cookie, do nothing if cookie shows user has visited before (in last 15 days) */
    	if( $.cookie("visited") != 'true' ) {
    		//console.log('New visitor, display popup');
    
    		/* Disply the cookie message */
    		$('#eu-cookie').show("fast");
    	}
    
    	/* Allow user to close cookie popup */
    	$('a.close-icon').click(function() {
    		/* Set popup not to display if user visited the site in the last 15 days */
    		$.cookie('visited', 'true', { expires: 15, path: '/' }); //cookie to be valid for entire site
    		//console.log('Close button clicked');
    		$('#eu-cookie').hide("fast");
    		return false;
    	});
    
    	/* Allow user to close cookie popup with escape, return or space button */
    	$(document).keydown( function(eventObject) {
    		if(eventObject.which==27) { //Escape button
    			/* Set popup not to display if user visited the site in the last 15 days */
    			$.cookie('visited', 'true', { expires: 15, path: '/' }); //cookie to be valid for entire site
    			//console.log('Escape button pressed');
    			$('a.close-icon').click(); //emulates click on prev button
    		}
    	});
    });
    })(jQuery);

    remember that the plugin uses the plugins.min.js so you have to minify this version and than rename it.

Viewing 3 replies - 1 through 3 (of 3 total)