• nomeiofio

    (@nomeiofio)


    The HTML of my page has <p> in the middle of the script. How could I fix this?

    <p><script>
    /* The Owl Initialization Script
    /* The first lines conditionally show the slide animation */
    jQuery(window).on("load", function(){
    	var $galleryContainer = jQuery( '#foogallery-gallery-1785' );
    	var $containerID = '#foogallery-gallery-1785';</p>
    <p>	jQuery(document).on('keydown', function( event ) { //attach event listener
    		if (event.keyCode == 37) {
    			$galleryContainer.trigger('prev.owl')
    		}
    		if (event.keyCode == 39) {
    			$galleryContainer.trigger('next.owl')
    		}
    	});</p>
    <p>	$galleryContainer.owlCarousel({
    			animateOut: false,
    		animateIn: false,
    			items: 1,
    		nav: false,
    		margin: 0,
    		loop:true,
    		autoplay: true,
    		autoplaySpeed: 2000,
    		smartSpeed:250,
    		navSpeed: 1250,
    		navText: ['prev', 'next'],
    		autoplayHoverPause: true,
    		lazyLoad: 1,
    		autoWidth: 1,
    			});
    });
    </script></p>
Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter nomeiofio

    (@nomeiofio)

    Hi.

    Any suggestion?

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi there,

    It was a national holiday last week here in the U.S. Can you provide a link so I can see the problem live? Also, please install this plugin and provide a link to your System Info so I can see a bit more about your environment: https://www.ads-software.com/plugins/send-system-info/

    Thanks!

    Thread Starter nomeiofio

    (@nomeiofio)

    Hi, Matt. Thanks for answering.

    See here the problem:

    https://www.nomeiofio.com.br/modelos/casablanca/teste/

    Here’s the link to System info

    https://www.nomeiofio.com.br/modelos/casablanca/?system_info=Do5PgEFdNZf2bJH2B7u4GHNXEltux5N1

    Thanks,

    Danilo

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    HI Danilo,

    It looks like you changed that gallery to a different template. Can you set it as an Owl Carousel again so I can see the problem live?

    Thread Starter nomeiofio

    (@nomeiofio)

    Hi, Matt.

    The template remains Owl Carousel. The problem is the script generated by page, with unwanted <p> tags. See this in the page HTML.

    Thank you for your help,

    Danilo

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hmmm… it’s really strange. I assume you are adding the gallery to that page with a shortcode right? Can you switch your editor to the “Text” tab and see if that shortcode has any weird markup in it? I’m kind of just guessing at this point because I don’t have a way to replicate that problem yet.

    Can you tell me a little about your history with Owl Carousel and that gallery specifically? Did you just create it? Did you just install Owl recently or have you been using it a while and updated it several times? I need to understand a bit more in order to have suggestions.

    Thanks!

    Thread Starter nomeiofio

    (@nomeiofio)

    Matt, in “text” tab the shortcode appears like that:

    [foogallery id="1664"]

    I installed the plugin for the first time, right after installing Foo Gallery and FooBox Image Lightbox.

    Thank you for your attention, my friend.

    Danilo

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Can I access your theme somewhere to download and test? Also, Please deactivate all plugins besides FooGallery and Owl Carousel. If it works as expected then re-activate each plugin one at a time until you see the problem again. Then let us know which plugin caused the error and we’ll dig into it.

    If after deactivating all other plugins it still does not work correctly, then tell us where we can get a copy of your theme to test.

    Thanks!

    Thread Starter nomeiofio

    (@nomeiofio)

    Matt,

    Here’s the link to download theme:

    https://www.nomeiofio.com.br/matt/theme.zip

    I tried disabling the other plugins, but it did not work.

    Thanks!

    Thread Starter nomeiofio

    (@nomeiofio)

    Hi, Matt.

    Did you get download the theme?

    Thanks,

    Danilo

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    I did. I’m at WordCamp US this week so my ability to troubleshoot is very limited, but I’ll tell you that when I activated it no pages of my local site were able to be viewed. I don’t believe at first glance that this is a problem with the plugin but the theme. I can take a closer look next week to provide you some details.

    Thread Starter nomeiofio

    (@nomeiofio)

    Matt, take your time. =)

    Thanks,

    Danilo

    Plugin Author Matt Cromwell

    (@webdevmattcrom)

    Hi Danilo,

    After activating the theme all I got was a bunch of errors on the front-end of the site. Most likely this theme is adding a bunch of functionality that belongs in a plugin instead. I also couldn’t access the Settings menu in the Admin. I would contact the Theme Author to see if they can use WordPress best practices to update their theme.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘HTML inserted in the code’ is closed to new replies.