Based on what I can see, it looks like your calling the create_map function incorrectly.
add_shortcode() takes 2 parameters, the name of the shortcode and the function that gets rendered when called.
The array you are passing is how to call a method inside of a class. You’re basically saying call the create_map method from the hotSpot class.
Assuming this code is not inside the hotSpot class – try this:
//change
add_shortcode( 'show_map', array('hotSpot', 'create_map'));
//to
add_shortcode( 'show_map','create_map');
Hope this helps!
Related Posts:
- How to include code only on specific pages?
- Can someone please tell me what is wrong with my plugin?
- accessing wp.media api from a tinymce plugin
- Redirect to another page using contact form 7? [closed]
- Deactivate JS Script in Plugin Shortcode
- Load CSS files in header of Bones theme?
- Why does my custom plugin only function correctly once per page?
- JS working when used normally but not in wordpress
- WordPress shortcode plugin not working
- Beginner question: Accessing js script in plugin
- All shortcodes not working on custom theme
- enqueue script only if it is not already enqueue
- Shortcode output appears before post body [duplicate]
- How do I only load a plugin js on it’s settings pages?
- How can I change my javascript after it has been enqueued? [closed]
- How to parse nested shortcodes?
- How to call shortcode function directly and pass $atts
- change plugin shortcode function [closed]
- Dynamic HTML not displaying at respective place
- Short code for Venues
- How to avoid redefining requirejs in plugin when another plugin also uses requirejs
- How do I store information in a dynamic block in WordPress?
- Shortcode doesn’t work if I directly paste its function in a template file?
- W3 Total Cache: Load CSS asynchronously for better PageSpeed score? [closed]
- Pass a php string to a javascript variable
- Problem in loading javascript in footer
- How to generate CSS from a shortcode within a plugin
- add mediaelement.js plugins into WordPress video player control bar
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- Internationalization autocomplete JS variable
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- Plugin Handle URL With Custom Theme
- How to put JQuery/Ajax inside shortcode?
- Snippets: is it better to add them in functions.php or make site-specific plugins?
- Scripts at the end of the page
- Trouble with editing template for “List category posts” plugin
- Enqueue WordPress plugin scripts below all other JS
- WordPress function not being called from jQuery method
- Time consuming callbacks in customizer
- Trying to create a private area custom for each user where they upload images to a server [closed]
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Add custom JavaScript that is a combination of CDN/uploaded files and easily-edited code?
- How to get my plug-in, wrote in php, to refresh on its own every 5 minutes?
- Using TinyMCE in plugin?
- Use $_GET inside a shortcode print empty Array
- Render Modula Plugin Shortcode On Ajax Request
- How to add a dvi tag to a shortcode then change a generated text using jQuery
- Remove / overwrite some functions in buddypress.js
- Shortcode not getting replaced
- Return multiple values in a shortcode attribute
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Shortcode Attributes to Return different $_POST
- Get param from shortcode in plugin function
- Loop returns the current page’s permalink and guid instead of the post in the loop
- Inserting shortcode in href – any ideas or workarounds?
- Conditional custom redirect
- Meta slider plugin only works after first refresh – Object has no method ‘flex slider’
- Javascript from Easy-Fancybox place into footer
- uncaught TypeError: Cannot read properties of null (reading ‘classList’) custom plugin
- How do I minify a plugins CSS/JS code?
- Elementor Pro display featured image on section -> style -> image using shortcode
- Directorist – Dropdown doesn’t open
- How to apply to hide TinyMCE (wp_editor) on button click
- Stop a script on a single page
- Get the link title attribute and send it google analytics as custom label via google tag manager using beehive pro for WordPress
- Calling PHP function with AJAX
- Shortcode show error while editing post
- How can I add a custom Javascript snippet to display my feedback in footer?
- Get Shortcode output to database for static post_content
- Website always load twice on start
- Issue Saving Posts That Contain Shortcode
- Using Shortcode Result In Custom HTML Block (Using Google Sheet JQuery Result As NumScroller data-max)
- Multiple image selection custom widget
- Execute inline javascript in wordpress after page fully loaded
- How to use plugin’s shortcode in custom design? [closed]
- Speeding up WordPress on a Local Network
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- WP Plugin CSS not being applied to page
- How to add HTML to a template only when user is logged out/ not registered
- Number format in thousands on highcharts in wpdatatable plugin
- Disqus comments count taking long to update
- Multiple calling javascript from shortcode in one page
- Embed Javascript code to registered users only
- Find all strings between an enclosing shortcode
- Best use adding user generated JS/CSS to a theme with a plugin
- Is there a function to search for a wildcard value when calling a shortcode?
- Multiple level shortcodes
- How to set up php,javascript and css to allow for our finished product to be displayed within a page?
- Ajax, jQuery and WordPress
- How to load a plugin when doing an Ajax call? [duplicate]
- Is it right way to create shortcode?
- Trying to override/intercept a PhotoMosaic gallery link in WordPress using jQuery
- Move specific javascript to the footer
- Creating Features List in WordPress Post
- How to make a rest style plugin?
- I am experiencing difficulty fulfilling client request
- Refresh server side rendered block in Gutenberg without changing attributes or its content
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- this code is fiven by chat-gtp but nothing match even I key in the value of a cell. help!
- Use custom Javascript for a custom Elementor Widget [closed]