• Resolved katerila

    (@katerila)


    Hi, I just added this plugin so I can add custom JS to my posts. But when I try, nothing happens, I just see blank space on the page.

    What am I doing wrong?

    thanks!

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

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author David Artiss

    (@dartiss)

    Can you provide some more detail?

    What code have you added and what should it look like, when working?

    Thread Starter katerila

    (@katerila)

    This is the code:
    <script type=”text/javascript” src=”//go.linkwi.se/delivery/js/crl.js”></script>
    <script type=”text/javascript”>
    LinkwiseCreative.show(“11739-71”, “CD24327”, “_blank”);
    </script>

    It should appear as a ferry booking form that you can enter your dates and it takes you to the booking site.

    I added it as a Custom Field called CODEletsferry and I put it inside my post as instructed by the plugin {{CODEletsferry}}. I even published the page with this code in it but nothing comes up in it, just blank space.

    First time I’m trying to add JS to my site so I’m not sure what I’m doing wrong.

    Plugin Author David Artiss

    (@dartiss)

    That code isn’t appearing on that page at all.

    You’re not using any page builders, are you? I assume {{CODEletsferry}} is being added to a standard post edit screen?

    Thread Starter katerila

    (@katerila)

    I do use Elementor but I’m not using it on this specific post. This post was built using wordpress. And yes, it’s added in the standard post edit screen

    thanks!

    Plugin Author David Artiss

    (@dartiss)

    Are you using the block or classic editor?

    Thread Starter katerila

    (@katerila)

    Sorry for the late response, I’m using the classic editor. Any idea how to fix this issue?

    thanks

    Plugin Author David Artiss

    (@dartiss)

    Ok, so can you tell me what’s in both the fields in the custom fields section? What’s in the name and value fields?

    Thread Starter katerila

    (@katerila)

    Name is CODEletsferry
    And value is:
    <script type=”text/javascript” src=”//go.linkwi.se/delivery/js/crl.js”></script>
    <script type=”text/javascript”>
    LinkwiseCreative.show(“11739-71”, “CD24327”, “_blank”);
    </script>

    Plugin Author David Artiss

    (@dartiss)

    And you have {{CODEletsferry}} in the post editor?

    Can you do me a favour and disable the Code Embed plugin? When you view the post on your site (i.e. not in the editor) can you now see {{CODEletsferry}} appear?

    Thread Starter katerila

    (@katerila)

    Yes, I do see it.

    Plugin Author David Artiss

    (@dartiss)

    I was hoping you wouldn’t say that!

    Okay, I need you to download and install and older version of the plugin – v2.3.2, more specifically. You can find it here: https://www.ads-software.com/plugins/simple-embed-code/advanced/.

    Please install that and let me know once thats up and running. It should still not work, as is now, but will add some extra information to your page source that I could do with.

    Thread Starter katerila

    (@katerila)

    Ok it’s installed. Now what?

    Plugin Author David Artiss

    (@dartiss)

    I assume you can no longer see {{CODEletsferry}} on the page now?

    Is the original example page still valid? i.e. https://stayclosetravelfar.com/best-tips-spots-for-santorini-pictures/

    Thread Starter katerila

    (@katerila)

    Yes, I don’t see the code anymore on the page

    Plugin Author David Artiss

    (@dartiss)

    Thanks.

    So, so one of two things is happening…

    1. The plugin is erroring and failing before the output is written out. But this seems unlikely – it takes the code (i.e. {{CODEletsferry}}) and replaces it with your script. If it was failing, that code would still be there.
    2. Something outside the control of my plugin is modifying page content.

    Right now it looks like the latter but I have no idea knowing what.

    That plugin version you installed adds HTML comments around the output and they aren’t appearing either – I was wondering if my plugin was just writing out empty content for some reason but, if this was the case, we’d still see the comments.

    You may want to try and age-old trick of switching off all other plugins to see if that cures it and, if not, temporarily switching to a different theme for the same reason.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Code not working’ is closed to new replies.