• Resolved Blake

    (@alexanderblake)


    Just about to wrap up a friend’s site, and there’s this extra bit of code in the footer (well, after it in the white space).

    When I view source, it’s the closing line after CDATA in the head, but there’s nothing in the header I can find.

    Any ideas how to get rid of it? It’s not impacting the site performance, but it’s there, and I don’t like it.

    Thanks,

    Blake

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi Blake,
    It looks like the CDATE code is commented out in the wrong way. It should either start with “/*” and end with “*/” or it should start with “//” and end with “//”. If you have access to the source, can you move the “//” on the last line of the CDATA code after the closing tag, so that it looks as follows:

    //<![CDATA[
    <script type=”text/JavaScript”>
    window.zESettings = {
    webWidget: {
    offset: { horizontal: ‘-30px’ }
    }
    };
    </script>
    ]]>//

    Hope this helps!

    Hello!

    I suspect the theme at first glance, or the theme + a plugin.

    You should start by disabling all the plugins first and see if the issue goes way. If it does, then you need to find out which plugin is causing this by deactivating them one by one.

    If it’s not a plugin issue, then switch to a default WordPress theme, and check again.

    Make a full website backup before making these changes.

    Thread Starter Blake

    (@alexanderblake)

    Thank you for the replies!

    Okay, I can see what is commented incorrectly, but where do I change that? I disabled all the plugins to no avail. It looks like it might be part of the wp-includes/post-template file, but I’m not sure.

    Where do I go to find (and edit) this section of code?

    Thanks again!

    Thread Starter Blake

    (@alexanderblake)

    BUMP

    Where do I find the CDATA code to edit? I’ve checked the header, and the main index template. I don’t know where else I might find it.

    Thanks for your help.

    Thread Starter Blake

    (@alexanderblake)

    Never mind, I found it. I removed it altogether (not just comment out correctly).

    Thanks.

    p.S. – It was in the custom JS section of my theme. It didn’t have any comment or quotes lines with it…

    <script type="text/JavaScript">
    window.zESettings = {
      webWidget: {
        offset: { horizontal: '-30px' }
      }
    };
    </script>

    I simply removed it, and we’re good to go now.

    • This reply was modified 7 years, 6 months ago by Blake. Reason: Added additional details

    Hi Blake,

    Great that you solved it! The CDATA bit looked out of place in all cases.

    Take care!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Extra //]]> in footer’ is closed to new replies.