Title: HTML inserted in the code
Last modified: November 25, 2016

---

# HTML inserted in the code

 *  [nomeiofio](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/)
 * 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](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8488961)
 * Hi.
 * Any suggestion?
 *  Plugin Author [Matt Cromwell](https://wordpress.org/support/users/webdevmattcrom/)
 * (@webdevmattcrom)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8490573)
 * 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://wordpress.org/plugins/send-system-info/](https://wordpress.org/plugins/send-system-info/)
 * Thanks!
 *  Thread Starter [nomeiofio](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8494064)
 * Hi, Matt. Thanks for answering.
 * See here the problem:
 * [http://www.nomeiofio.com.br/modelos/casablanca/teste/](http://www.nomeiofio.com.br/modelos/casablanca/teste/)
 * Here’s the link to System info
 * [http://www.nomeiofio.com.br/modelos/casablanca/?system_info=Do5PgEFdNZf2bJH2B7u4GHNXEltux5N1](http://www.nomeiofio.com.br/modelos/casablanca/?system_info=Do5PgEFdNZf2bJH2B7u4GHNXEltux5N1)
 * Thanks,
 * Danilo
 *  Plugin Author [Matt Cromwell](https://wordpress.org/support/users/webdevmattcrom/)
 * (@webdevmattcrom)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8494549)
 * 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](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8494737)
 * 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](https://wordpress.org/support/users/webdevmattcrom/)
 * (@webdevmattcrom)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8495083)
 * 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](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8495331)
 * 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](https://wordpress.org/support/users/webdevmattcrom/)
 * (@webdevmattcrom)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8495372)
 * 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](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8497273)
 * Matt,
 * Here’s the link to download theme:
 * [http://www.nomeiofio.com.br/matt/theme.zip](http://www.nomeiofio.com.br/matt/theme.zip)
 * I tried disabling the other plugins, but it did not work.
 * Thanks!
 *  Thread Starter [nomeiofio](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8502614)
 * Hi, Matt.
 * Did you get download the theme?
 * Thanks,
 * Danilo
 *  Plugin Author [Matt Cromwell](https://wordpress.org/support/users/webdevmattcrom/)
 * (@webdevmattcrom)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8505192)
 * 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](https://wordpress.org/support/users/nomeiofio/)
 * (@nomeiofio)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8507646)
 * Matt, take your time. =)
 * Thanks,
 * Danilo
 *  Plugin Author [Matt Cromwell](https://wordpress.org/support/users/webdevmattcrom/)
 * (@webdevmattcrom)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8526184)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/foogallery-owl-carousel-template_1cc9cd.
   svg)
 * [FooGallery Owl Carousel Template](https://wordpress.org/plugins/foogallery-owl-carousel-template/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/foogallery-owl-carousel-template/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/foogallery-owl-carousel-template/)
 * [Active Topics](https://wordpress.org/support/plugin/foogallery-owl-carousel-template/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/foogallery-owl-carousel-template/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/foogallery-owl-carousel-template/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Matt Cromwell](https://wordpress.org/support/users/webdevmattcrom/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/html-inserted-in-the-code/#post-8526184)
 * Status: not resolved