I want to use javascript in Dyad 2 theme, but it says my token has expired.

  • Unknown's avatar

    I am currently using the Dyad 2 theme, and I have added Javascript using custom Javascript from apperace, but I am getting the following error.

    “Error while saving. Please try again. Your security token may be expired; you may need to copy your work and reload the page to continue.”

    After the above,
    I have tried clearing the cache and disabling other plugins, but it seems that Javascript is not allowed. What could be the cause?
    I am having trouble because I can’t add Javascript. I would appreciate it if you could help me.

    The blog I need help with is: (visible only to logged in users)

  • Hi there,

    Can you tell us more about where you are trying to add your code? Can I see this on your homepage?  Or is it a specific place I need to look at?  Also can you tell us more about the code you are trying to add? Can you share the code in your reply so we can try adding it?

    Thanks for pointing it out!

  • Unknown's avatar

    Thank you for your reply.
    My website is not published yet ,Sorry..
    The location is in the side menu of the wordpress admin page
    “Appearance” > “Custom JavaScript”.
    in the side menu of the WordPress admin page, and in the input field, type
    alert(“test”);
    and press Save & Publish,
    The above error message is displayed.

    Please let me know if there are any more questions.
    Thank you for your help.

  • Are you using the “Custom CSS and JavaScript” plugin? It looks like they’ve seen that error before, but I don’t see a resolution. Here’s another thread in their forum. There’s a support email listed at the bottom. Do you want to try to reach out there?

    Alternatively, there are other plugins for adding code snippets, or if you’d like to share what you’re trying to do with Dyad, we may have another recommendation.

  • Unknown's avatar

    Hi.

    Thank you very much.
    Thanks to you I was able to successfully insert javascript and solve the problem.

    I used a plugin called WPCode.

    Thank you very much for your kind suggestion.

  • The topic ‘I want to use javascript in Dyad 2 theme, but it says my token has expired.’ is closed to new replies.