Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You need to show us the code with the problem, tell us how you’ve implemented it in your WordPress site and then show us the Webpage with the problem.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
You need to do things a lot differently:
- Set up a child theme
- Create a .js file inside your Child Theme folder that includes your JavaScript
- Ensure that the JavaScript file from within your Child Theme is using jQuery in noConflict mode: https://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers
- Enqueue the right jQuery libraries. jQuery itself is bundled with WordPress so you don’t need to and should not enqueue it again. Just use the ‘jQuery’ handler: https://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_Scripts_Included_and_Registered_by_WordPress
- Enqueue that Child Theme JavaScript file from your functions.php file
- Add the necessary markup to your post or page in the dashboard. Do not include unnecssary code like the
<body>, <html> or <script> tags.
Thread Starter
ijared
(@ijared)
Thanks but I can’t do that you saying. I don’t have access to create themes. But thanks for letting me know.
Thread Starter
ijared
(@ijared)
Hi, I will be grateful if anyone knows to I can expand an image in a thumbnail on wordpress.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support