Forum Replies Created
-
AuthorPosts
-
My bad, I was using the is_admin conditional in my JS rather than functions.php. Working perfectly now, thanks so much!
It’s now throwing the error “is_admin is not defined”.
EDIT: The layout builder is loading – but my custom script doesn’t work on the front-end now as it’s throwing the above error. Any ideas? Am I loading it in correctly? I’m clueless with PHP.
- This reply was modified 10 years, 1 month ago by plugmedialtd.
Hi Josue,
That was it, thanks! I didn’t realise my JS file would execute in the admin section I guess. What can you suggest to fix this? The error isn’t getting thrown client-side. I’m loading the file in functions.php in my child theme, like this –
wp_enqueue_script( ‘fixed-sidebar’, $template_url.’/wp-content/themes/enfold-child/custom.js’, array(‘jquery’), 1, true);
All files were overwritten when I updated. I just tried overwriting the JS folder one more time to make sure it copied over properly, but the issue still remains.
This reply has been marked as private.I updated the theme on a staging copy, with no luck.
Hi Yigit,
Thanks for the reply. I tried both of your suggestions and neither made any difference unfortunately.
This reply has been marked as private. -
AuthorPosts