Site logo

Archived topic

Weird script on top of page

9 replies · Started by Mimillia May on August 10, 2021

Viewing posts 1–10 of 10

Hello. I have this weird script that shows up on all pages of the new site i'm creating.

/* GeneratePress Site CSS */ /* Main container styles */ .separate-containers #page .site-main { margin-top: -80px !important; } @media (max-width: 768px) { body .site.grid-container { margin-left: 30px; margin-right: 30px; } } .site-content .inside-article, .sidebar .widget, .comments-area { box-shadow: 0px 0px 0px 1px rgba(214,218,222,1); } /* Posts grid styles */ @media (min-width: 769px) { .generate-columns .inside-article { transition: all 0.2s ease-in; transform: scale(1); } .generate-columns .inside-article:hover { transform: scale(1.01); box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.3); } p.read-more-container { opacity: 0; transition: all 0.3s ease-in-out; } .generate-columns .inside-article:hover p.read-more-container { opacity: 1; } } .generate-columns .inside-article { display: flex; flex-direction: column; border-radius: 3px; } .generate-columns .inside-article .entry-summary { display: flex; flex-direction: column; flex-grow: 1; } .entry-summary p:not(.read-more-container) { display: none; } .read-more-container { margin-top: auto; text-align: center; } button, html input[type="button"], input[type="reset"], input[type="submit"], a.button, a.button:visited { border-width: 1px; border-style: solid; border-color: inherit; border-radius: 3px; } .blog footer.entry-meta, .archive footer.entry-meta { margin-top: 0; } /* Sidebar styles */ .sidebar .widget:first-child { background-image: linear-gradient( 145deg, rgb(164,218,216) 0%, rgb(228,243,242) 100%); } /* End GeneratePress Site CSS */

how do i remove it?

Hi there,

I believe that's a CSS added on Appearance > Customize > Additional CSS.

But that shouldn't be happening. Something seems to be breaking the HTML code of the site.

Let's trying debugging it.

For starters, can you try disabling ALL plugins except GP premium and see if it still shows up? Also, if you have a child theme, can you temporarily deactivate it and keep only the parent theme active?

Let us know.

Hello. I deactivated all plug-in as you suggested and the problem is still there.

The issue must be coming from something else then.

Something seems to have broken where this CSS normally is placed.

Normally this should be inside <style id="wp-custom-css"> on the <head> tag of your site as this exact CSS can be found on Appearance > Customize > Additional CSS.

Does your site have a child theme? If not, does the site have any Hook elements in use? ( found in Appearance > Elements )

It does not have a child theme... and I added a hook yesterday for google analytics. I just removed it and it seemed to have resolved the issue. So now my question is how do I add google analytics code?

I copied and pasted the code from google Analytics exactly.. here is the code (I deleted my tracking code and replaced with xxx)

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxxx-x"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-131489427-4');
</script>

Try repasting it into the Hook - and retest.

Ok that worked! thanks for your help!

Glad to hear that!

This archived topic is closed to new replies.