Help me find and remove this annoying piece of code

Site: http://www.themilliondollarserver.com
Theme: suffusion

Leadpages doesn't really work the way I want it to so... I kind of highjacked it.

I wanted to use a leadpages section in my website rather than use it as a whole new page, so I made a leadpage here and grabbed the two sections of code to paste into the head and body. The snippets I added are shown at the bottom of the page.

All good so far!

When I added the head section into my css overrides (appearance>suffusion options>backend>custom includes) an annoying piece of code appeared in my header as well. I thought maybe it was due to incorrect coding, but the code seems to be clean! I traced it down to this section of my header

<!-- CSS styles constructed using option definitions -->
<style type="text/css">
/* <![CDATA[ */
#wrapper #nav {float: left;}
/* ]]> */
</style>
<!-- Custom CSS styles defined in options -->

you can see that this does not actually appear anywhere in the coding that I added:

HEAD:

<meta charset="utf-8"><link rel="stylesheet" type="text/css" href="//my.leadpages.net/static/lp910/public/css/leadpage.css"><script>window.LeadPageData = {};</script><script type="text/javascript" src="//my.leadpages.net/static/lp910/public/js/leadpage.js"></script>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
	<link rel="stylesheet" href="//greatbonus.leadpages.net/f/mXIFWg2EbDLxs96trGfiGUrueWC61nM00YYTXQRBm66NSQCQTWrQMlWdvEiLQEXpYt8gPbmjzAk3KS4AbwJdag%253D%253D%7Ccss/normalize.min.css">
	<link href="https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700,300" rel="stylesheet" type="text/css">
	<link rel="stylesheet" href="//greatbonus.leadpages.net/f/mXIFWg2EbDLxs96trGfiGUrueWC61nM00YYTXQRBm65cHiFxsb3VUc6tIAt5lPy8NykuAG8CXWo%253D%7Ccss/style.css">
	<script src="//greatbonus.leadpages.net/f/mXIFWg2EbDLxs96trGfiGUrueWC61nM00YYTXQRBm67INLrZD2o7qCJeTqzOuwVVkqSGeDambc2fKvbfDci7Jg%253D%253D%7Cjs/html5shiv.js"></script>
	<script src="//greatbonus.leadpages.net/f/mXIFWg2EbDLxs96trGfiGUrueWC61nM00YYTXQRBm66PkLQ2yNeYa/iS/kWbWHDY5WHBvxBCvoxfdYaTdXieghKO0U9N4SLl%7Cjs/jquery-1.9.1.min.js"></script>
	<script src="//greatbonus.leadpages.net/f/mXIFWg2EbDLxs96trGfiGUrueWC61nM00YYTXQRBm67mF1Tkc3iQORdGXYCtCZ32kqSGeDambc2fKvbfDci7Jg%253D%253D%7Cjs/functions.js"></script>
<style type="text/css">.cf:before,.cf:after{content:" ";display:table}.cf:after{clear:both}.media{margin:0}.media,.media__body{overflow:hidden;_overflow:visible;zoom:1}.media .media__img{display:block;float:left;margin-right:10px}.media .media__img img{display:block}.media .media__img--rev{display:block;float:right;margin-left:10px}*{box-sizing:border-box}html{font-size:16px}body{margin:0;padding:0;min-width:300px;font-family:'Open Sans',sans-serif;background-color:#fffffe;word-wrap:break-word;-webkit-font-smoothing:antialiased}img{max-width:100%}h1{font-size:1.875rem;line-height:1.2;color:#24b663}h2{font-size:1.625rem;line-height:1.2;color:#24b663}h3{font-size:1.25rem;line-height:1.2;color:#707070}a:link,a:visited{color:#21a65b}a:hover,a:active{color:#24b661}.cta-btn{display:block;border:1px solid transparent;border-radius:3px;padding:20px 10px;max-width:100%;font-size:1.125rem;font-weight:700;color:#fffff0;background:#24b663;text-decoration:none;text-align:center;-webkit-transition:all 0.3s;-o-transition:all 0.3s;transition:all 0.3s}.cta-btn:link,.cta-btn:visited{color:#fffff0}.cta-btn:hover{border-color:#24b663;background:transparent;color:#24b663}.credit-cards-wrap{display:block;margin:16px 0 0;text-align:center}.credit-cards{display:inline-block;margin:0;padding:0;list-style:none}.credit-cards li{display:block;float:left;margin-right:9px}.credit-cards li:last-child{margin:0}.credit-card{display:block;width:51px;height:33px}.site-header-wrap{padding:0 20px;background:#fffffe}.site-header{margin:0 auto;padding:20px 0 17px;max-width:960px}.site-header__logo{display:block;margin:0 auto;width:100%;max-width:163px}.conversion-banner-wrap{padding:0 20px;background:#0099cc}.conversion-banner{margin:0 auto;padding:30px 0;max-width:960px}.conversion-banner__hero-img.media__img{margin:0 auto 20px;float:none;width:50%;max-width:289px}.conversion-banner__title{margin:0;padding:0 0 10px}.conversion-banner__by-line{margin:0;padding:0 0 1.5em;font-size:1.125rem;color:#fffffa}.conversion-banner__body{margin:0 0 0.5em;padding:0;font-size:1.125rem;line-height:1.444444444;color:#fffffa}.conversion-banner__body p{margin:0;padding:0 0 1em}.conversion-banner__cta-btn{margin:0 auto;width:100%;max-width:400px}.features-wrap{padding:0 20px;background:#fffffd}.features{margin:0 auto;padding:35px 0;max-width:960px;color:#707071}.features__title{margin:0;padding:0;text-align:center}.features__sub-title{font-size:1.125rem;line-height:1.555555556;text-align:center}.feature-list{margin:35px 0 0;padding:0;list-style:none}.feature{display:block;margin:0 0 30px;padding:0}.feature:last-child{margin:0}.feature-icon.media__img{margin-top:15px;margin-right:15px;width:60px;max-width:60px}.media__body--feature{width:calc((100%) - 75px);float:right}.feature__title{margin:0;padding:0 0 15px}.feature__body{margin:0;padding:0;font-size:1.0625rem;line-height:1.294117647}.testimonials-wrap{padding:0 20px;background:#f1f1f1}.testimonials{margin:0 auto;padding:33px 0;max-width:960px;color:#707070;text-align:center}.testimonials__quote{margin:0 0 1em;padding:0;font-size:1.25rem;line-height:1.45}.testimonials__attribution{margin:0;padding:0;font-size:1.125rem;line-height:1.4;font-weight:300}.in-depth-wrap{padding:0 20px;background:#fffffc}.in-depth{margin:0 auto;padding:30px 0;max-width:1170px}.in-depth__content-block{display:block;padding:40px 0;border-top:3px solid #f2f2f2}.in-depth__content-block:first-child{padding-top:0;border-top:none}.in-depth__content-block:last-child{padding-bottom:0}.content-block__img.media__img,.content-block__img.media__img--rev{margin:0 auto 30px;float:none;width:60%;max-width:350px}.content-block__title{margin:0 0 0.5em;padding:0}.content-block__body{margin:0;padding:0;font-size:1.125rem;line-height:1.555555556}.author-bio-wrap{padding:0 20px;background:0099cc}.author-bio{margin:0 auto;padding:33px 0;max-width:1170px}.author-bio__video-embed-wrap.media__img--rev{margin:0 auto 30px;float:none}.author-bio__video-embed{display:block;padding-bottom:56.25%;width:100%;height:0;position:relative}.author-bio__video-embed iframe,.author-bio__video-embed img{position:absolute;top:0;left:0;width:100%;height:100%}.author-bio__photo.media__img{margin:0 auto 30px;float:none;border:3px solid #fffff1;border-radius:3px;width:38%;max-width:198px}.author-bio__title{margin:0;padding:0}.author-bio__body{font-size:1.125rem;line-height:1.555555556;color:#fffffa}.author-bio__cta-btn{width:100%;max-width:400px}.newsletter-cta-wrap{padding:0 20px;background:#f1f1f0}.newsletter-cta{margin:0 auto;padding:20px 0 15px;max-width:752px}.newsletter-cta__cta-btn{margin:0 auto 0.625em;width:100%;max-width:700px}.newsletter-cta__body{margin:0 auto;max-width:440px;font-size:1rem;line-height:1.5;font-weight:300;color:0099cc;text-align:center}.footer-cta-wrap{padding:0 20px;background:#fffffb}.footer-cta{margin:0 auto;padding:30px 0 35px;max-width:880px;text-align:center}.footer-cta__title{margin:0;padding:0 0 0.6em}.footer-cta__body{margin:0;padding:0 0 1.5em;font-size:1.125rem;line-height:1.555555556;color:#707070}.footer-cta__hero-img{margin:0 auto 20px;width:50%;max-width:289px}.footer-cta__prices{margin:0 0 40px;padding:0}.prices__original{display:inline-block;margin:0 5px 0 0;padding:0;font-size:1.6875rem;color:#707070;text-decoration:line-through;max-width:150px}.prices__buy-now{display:inline-block;margin:0;padding:0;font-size:2.625rem;font-weight:700;color:#24b663;max-width:250px}.prices__disclaimer{display:block;margin:0;padding:0;font-size:1.25rem;line-height:1.3;color:#707070}.footer-cta__cta-btn{margin:0 auto;width:100%;max-width:522px}.site-footer-wrap{padding:0 20px;background:#f1f1f2}.site-footer{margin:0 auto;padding:20px 0;max-width:960px;text-align:center}.site-footer a,.site-footer a:link,.site-footer a:visited,.site-footer a:hover,.site-footer a:active{color:#7d7d7d}.site-footer a:hover,.site-footer a:active{text-decoration:none}.site-footer__fineprint{margin:0;padding:0;font-size:1.125rem;line-height:1.555555556;color:#707070}@media only screen and (min-width:26em){.cta-btn{font-size:1.5625rem}}@media only screen and (min-width:30em){.author-bio__photo.media__img{margin:0 4.166666667% 0 0;float:left;width:20%}}@media only screen and (min-width:42em){.content-block__img.media__img{margin:0 4.6875% 0 0;float:left;width:36.458333333%}.content-block__img.media__img--rev{margin:0 0 0 4.6875%;float:right;width:36.458333333%}}@media only screen and (min-width:45em){.site-header__logo{margin:0}.conversion-banner{padding:60px 0}.conversion-banner__hero-img.media__img{margin:0 6.25% 0;padding:0;float:left;width:30.1041667%}.conversion-banner__cta-btn{margin:0;max-width:100%}.conversion-banner__credit-cards-wrap{text-align:left}.features{padding:65px 0 45px}.feature-list{margin:70px 0 0;-webkit-column-count:2;-moz-column-count:2;column-count:2;-webkit-column-gap:50px;-moz-column-gap:50px;column-gap:50px}.feature{margin:0 0 50px;-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid}.testimonials{padding:65px 0 60px}.in-depth{padding:60px 0}.in-depth__content-block{padding:50px 0}.author-bio{padding:66px 0}.newsletter-cta{padding:40px 0 30px}.footer-cta{padding:60px 0 70px}.site-footer{padding:30px 0}}@media only screen and (min-width:53em){.author-bio__video-embed-wrap.media__img--rev{margin:0 0 0 5.982905983%;float:right;width:40.769230769%}.author-bio__photo.media__img{width:32%}}@media only screen and (min-width:62em){}
</style><meta content="" name="description"><meta content="" name="keywords"><meta content="141957173f72a2:16e4d2418b46dc" name="leadpages-meta-id"><meta content="5754258133614592" name="leadpages-form-id"><meta content="//greatbonus.leadpages.net" name="leadpages-url"><meta name="leadpages-meta-id" content="141957173f72a2:16e4d2418b46dc" /><meta name="leadpages-served-by" content="leadpages" />

BODY:

<section class="conversion-banner-wrap role-element leadstyle-container">
		<div class="conversion-banner media">
			<img src="//lh4.ggpht.com/fRAhFfyxgJeo6bAjzyJtPgrgdr3_x3MYdtqFYgYiWfXeL7_eN1pN9rwhstPXI0-fQlqeERqAUwDHfHYHdcbvPA=s0" class="conversion-banner__hero-img media__img media--vc role-element leadstyle-image" style="max-width: 289px;">
			<div class="media__body">
				<h1 class="conversion-banner__title role-element leadstyle-text"><span style="color:#F0F8FF;"><span class="leadstyle-fontsized" style="font-size:36px;"><span style="font-family:julius sans one;"> The Million Dollar Server</span></span></span></h1>
				<div class="conversion-banner__body role-element leadstyle-text"><p><span style="color:#F0F8FF;"><span style="font-family:raleway;">GREAT NEWS! The much anticipated Million Dollar Server eBook is now available! Join one waiter on his journey from<em> ZERO </em>to <em>HERO</em> as he struggles through the relentless ups and downs of the restaurant industry.</span></span></p><p><span style="color:#F0F8FF;"><span style="font-family:raleway;">Follow him through all of his HILARIOUS mishaps, DEVASTATING terminations and UNBELIEVABLY smooth seductions as he risks life and limb for big tips and exciting adventures.</span></span></p></div>
				<a href="/leadbox/141957173f72a2:16e4d2418b46dc/5754258133614592" class="cta-btn conversion-banner__cta-btn role-element leadstyle-link">ORDER YOUR COPY NOW</a>
				<div class="credit-cards-wrap conversion-banner__credit-cards-wrap">
					<ul class="credit-cards cf role-element leadstyle-container">
						<li class="role-element leadstyle-container"><img src="//lh6.ggpht.com/NHtPYYWiCGnqdb9zaC2nW_4-5LWp6lUT36KO1vK_IG03OKE-_T3t1HkxRGJJlDJvXCykZYtf_wJz2M3JgwoR=s0" alt="VISA credit card" class="credit-card"></li>
						<li class="role-element leadstyle-container"><img src="//lh4.ggpht.com/Ig7oWDFZqCm01vFB1hXOk1JlIGskpXY6oOI32f-WwFZ3EuZiadM0ovZg4YKvVgezbGctgzvZxNlphkntMoGX=s0" alt="MasterCard credit card" class="credit-card"></li>
						<li class="role-element leadstyle-container"><img src="//lh3.ggpht.com/VG7yHD-d9zdbwo3C4YkcvPPWzplUYO7YEwzs2oagYJSRHOe7RfH1_XY7lL9fvpJYi2diifV4F1aOixgy10s6H1w=s0" alt="American Express credit card" class="credit-card"></li>
						<li class="role-element leadstyle-container"><img src="//lh5.ggpht.com/HOChr6YrwDXJiB0ETKtU0JnHe2XnQIJo6x5GjEtjYjp8Qf5K7opf5qIM8eLROV84Uha3WIqdLIsbbVO6MMzbhA=s0" alt="Discover credit card" class="credit-card"></li>
					</ul>
				</div>
			</div>
		</div>
	</section>
	<script src="https://my.leadpages.net/static/lp910/min/tracking.js"></script>

Please help me remove that stubborn little bit of code! I know its a lot of work, I wish WPMU gave an option to tip DEV's who go above and beyond, which you so often do! Thanks in advance!

  • Tyler Postle

    Hey rc,

    Hope you're doing well today!

    The issue here is that your custom CSS field is only meant for CSS styles, the code you're adding to it includes html as well - that looks to be causing the issue.

    Remove that and keep only CSS styles in there.

    If you want to replace any of the HTML in the header then do it in the actual header.php - make a child theme if you don't have one, then you can place it what you need to and it will remain there throughout updates to the parent theme :slight_smile:

    What are you trying to change exactly with that header and body code? Perhaps there is somewhere else we can place it or another way we can work it in.

    Look forward to hearing back!

    All the best,
    Tyler

  • rc_snowboarder

    What I am trying to do is take this: https://greatbonus.leadpages.net/richards-book/

    and add it to my homepage. I inspected the source code and found that it was comprised of <head> and <body> sections of code. I've seen many "widgets" that require placing the body section where you want it to appear and past the head section anywhere before the </head> tag.

    The body section of this code is pasted into a JS box in Visual Composer on my home page. The head section of the code contains all the styling elements, so I stuck it in my css overrides to see what would happen, and it actually worked, minus the extra code now in the header.

    I took your advice, and tried moving the head section of code into header.php, and then also into the JS box with the body but neither worked, they prevented my header image from appearing and blocked some posts too.

    The Leadpages tool is meant to be used as a page on its own, not as an element in an existing page. This is completely retarded, and I want to use it in my existing page. It seems to look and work properly, other than that stupid bit of code that gets added no matter where the head section is placed.

    Any advice? I've granted access to my site and you're free to make and leave any changes you'd like. I'll understand if you can't help and need me to contact leadpages about this instead. It looks so close to how I wanted though! haha

  • Tyler Postle

    Hey Rc,

    Thanks for the detailed reply :slight_smile:

    So, you want to place that whole section above your current picture of the tuxedo man?

    Another option here, would be to create a copy of your page.php template, then re-name it to front-page.php and enter the code into that one. front-page.php will only apply to your home page so you don't have to worry about the changes being applied to your other pages too :slight_smile:

    It might take a bit of trial and error to get the positioning right. Let us know if that does the trick and if you need further assistance we can take another look.

    Enjoy the rest of your weekend!

    Cheers,
    Tyler

  • rc_snowboarder

    Nope, I don't want it above the header. Where I have placed it right now is exactly where I want it. I know what you are trying to say with copying the page template, but I do not think this will change the fact that the bit of code gets added to the top of the page, as was the case when I moved the code from the css overrides to the header.php.

    You've been of great help, ill go bug the team at leadpages for a bit and see if they can help.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.