• Resolved psbigleap

    (@psbigleap)


    I’m trying to add Schema code to a site. The simplified code looks like this:

    <script type="application/ld+json">{"@context": "https://schema.org",... lots of info here ... }</script>

    When I try to add using this plugin using HTML snippet, it strips out the <script type="application/ld+json"> and </script>. A JS snippet also doesn’t seem to work since it’s not JavaScript, it’s JSON.
    I’d hoped a “universal snippet” might work, but it doesn’t work either. The JSON just is added to the page (as text) instead of as script or code.

    Does anyone know if there is a way to add a JSON script to a page using this plugin? I’m hoping I don’t need another plugin.

    Thanks in advance.

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

Viewing 1 replies (of 1 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @psbigleap,

    You should be able to do that simply by using the HTML code type. WPCode definitely works for adding script tags, it’s one of the main ways that WPCode is being used.

    It sounds like there may be something else in your setup stripping out script tags.

    I would suggest looking first at any plugins that you have installed that may be interfering there. If that doesn’t help you may also want to look at any firewall that may be stripping out tags.

    One quick way that I think can help narrow it down is by trying to add the schema code in the Header & Footer area – if that works and the script tags are not stripped it’s most likely a plugin causing the issue. If that doesn’t work either, it’s more likely that it’s a restriction at server level.

    If you can’t find what is causing this issue please reach out at https://wpcode.com/contact and we can look into this further to help you find the issue.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.