[Resolved] Uncaught SyntaxError: Unexpected Identifier on post.php due to GP

Home Forums Support [Resolved] Uncaught SyntaxError: Unexpected Identifier on post.php due to GP

Home Forums Support Uncaught SyntaxError: Unexpected Identifier on post.php due to GP

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1635359
    Adverthia

    Hello everybody!

    This issue occurs when I try to edit or create a new page/post while GP is activated, or when I try to edit a page with elementor (also when GP is activated). I tried deactivating all the plugins and the error persisted, it only was solved when I changed the theme so that is why I think that is a GP issue.

    Hope that someone can help me, thank you for your time!

    #1635462
    David
    Staff
    Customer Support

    Hi there,

    are you using a Child Theme ? Or have you made any modifications to the themes functions ?

    #1635472
    Adverthia

    Hi David,

    Thanks for your quick response. Yes, I made a few modifications on the header and footer files to include the PD Cookie Consent javascript library, but I tried removing those lines and the error still persisted. Didn’t touch any functions.php file from the theme, I just added a few lines with <script> and <link> tags for the Cookie Consent.

    Thank you

    #1635497
    David
    Staff
    Customer Support

    If you can restore the GP Theme to its original state, by simply deleting and re-installing the theme ( you’re settings will be saved ) – to make sure those changes haven’t caused an issue.

    Then for adding codes to the header you can use the Hook Element to add scripts to wp_head hook:

    https://docs.generatepress.com/article/hooks-element-overview/

    #1635815
    Adverthia

    I did and it works fine! Thank you so much for your support

    #1635817
    David
    Staff
    Customer Support

    Glad to be of help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.