• WordPress in injecting a hidden </p> into my code.

    I have read past posts going back years on hidden code, but people seemed to have this everywhere on their sites. I only have this on one page after modifying the Schema code.

    I have Schema code on every page and have never had issues before when modifying the code.

    • I updated WordPress to 6.1.1
    • I deactivated Advanced Editor Tools
    • Installed and tried Classic Editor +
    • Deactivated Yoast SEO

    Nothing worked, so I had to totally remove the Schema code to resolve the Unparsable Structured Data error.

    Google Rich Results Test and Google Search Console finds the following:

    “datePublished”: “2019-12-19”,
    “dateModified”: “2023-03-01”
    }
    </script></p>
    <h1><span

    With the hidden </p>

    Removing the Schema code is not a solution. I’m worried this may happen on other pages after modifying the code.

    How do I resolve this?

    Thank you for your assistance.

    • This topic was modified 1 year, 11 months ago by nrosskothen.

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

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You cannot enter script code via the WP editor. It’s always prone to getting corrupted, just as you have experienced. Usually the best way to add structured data is via a SEO oriented plugin.

    If such plugins are not suitable for some reason, and the data needs to be within post content, you could create a custom shortcode or block that injects the code after WP has finished mucking about with the post’s content.
    https://developer.www.ads-software.com/plugins/shortcodes/

Viewing 1 replies (of 1 total)
  • The topic ‘Structured Data Issue – Hidden Code’ is closed to new replies.