Problem with Custom JavaScript Not Loading Properly on WordPress Page
-
Hi WordPress Community,
I’m facing an issue with a custom JavaScript calculator I’ve embedded on a WordPress page (via a custom shortcode). The script works perfectly in standalone HTML, but on the WordPress site, either:
- It doesn’t load at all, or
- Some functions break or behave inconsistently, especially on mobile.
I’ve tried enqueueing the script via
functions.phpand also adding it inline within the page, but no luck. I’m using a block-based theme (FSE), and the site is built with minimal plugins to avoid conflicts.Has anyone encountered similar problems with JS not executing correctly in WordPress? Could it be related to how Gutenberg handles blocks or script loading order?
Any advice or working solutions would be much appreciated!
The blog I need help with is: (visible only to logged in users)
-
We can’t help as that site isn’t running on the wordpress.com platform – https://wordpress.com/site-profiler/http://calculerenligne.fr – nor can we help with custom coding.
You must take a look in the documentation at wordpress.org to solve this problem yourself.
-
Thanks for your reply. Just to clarify — I’m the owner of calculerenligne.fr, and I did build the site myself using the self-hosted WordPress.org platform, not WordPress.com. I understand support for custom coding is limited here, but I was hoping to get guidance or suggestions from other developers who may have faced a similar issue with JavaScript not loading properly.
-
You are on the forum of wordpress.com, not wordpress.org. That’s why you must head over to the wordpress.org website.
- The topic ‘Problem with Custom JavaScript Not Loading Properly on WordPress Page’ is closed to new replies.