Site logo

Archived topic

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

5 replies · Started by Adverthia on January 27, 2021

Viewing posts 1–6 of 6

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!

Hi there,

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

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

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/

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

Glad to be of help.

This archived topic is closed to new replies.