You should probably write a plugin, which has the shortcode function. You can separate the AJAX/jQuery code in a plugin, but not in a shortcode.
Related Posts:
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- WordPress function not being called from jQuery method
- Using color picker in plugin, does input attribute order matter?
- wordpress add_action() issue in ajax call
- How do I reinit WordPress plugins dynamically using jS?
- WP Ajax DB issues
- JS working when used normally but not in wordpress
- Help with customising love it plugin (use within foreach)
- AJAX doesn’t pass variables to the php function in the plugin
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- Help making my pagination plugin better
- PHP Deprecated: Non-static method should not be called statically
- How can I pass a variable to wp_ajax action?
- Loading shortcode with ajax
- Adding Custom Fields for Img in Posts
- How to pass JavaScript variable to PHP in wordpress widget?
- How To Ignore a Filter On Applying Filter the Content In a Function
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- jQuery AJAX call not executing in Plugin
- How to save Clicks of a download link button while it doesn’t matter if we refresh the page or again login/logout
- Calling function from within functions.php returns unwanted value
- How to create popup same as wordpress popup feature
- Ajax with jQuery UI dialog not working
- Shortcode in AJAX popup
- Can’t get custom posts of taxonomy to show
- How to add pagination to wpbakery grid?
- jQuery function didn’t work in my plugin
- jQuery Plugin to use WordPress functions in AJAX request
- how to include a simple jquery file into a wordpress plugin
- Shortcode to generate and save password in a file
- Check if email address exists front end with AJAX in a plugin
- Pass a php string to a javascript variable
- get shortcode value
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- WordPress Ajax Callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Storing Options in a Shortcode
- WooCommerce get_price returning wrong price when used via ajax
- Shortcode button dosent work for all posts. Work for first post only
- How to remove html code in excel downloads using phpspreadsheet with wordpress plugins shortcode
- Notepad sticky plugin
- Form isn’t inserting data into database with ajax plugin
- Adding a slider captcha to the comment system
- Can someone please tell me what is wrong with my plugin?
- Error with Image Slide plug-in/ s3slider in WP
- wordpress site | All-in-one-cufon IE Issue
- WordPress Shortcode to get URL Parameters $_GET[‘name’] redirects for no reason at all
- Using a custom plugin to capture input data via Ajax and PHP
- Ajax contact form widget plugin data not insert in database
- Making sure that a plugin’s scripts and stylesheets are included for dynamicaly loaded content
- Nested shortcode functions accessing variable
- Ajax call returning 0
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- Some code in shortcode function being ignored
- How can I inject options into an select tag inside the widget form?
- Display wordpress post’s in popup?
- How to prevent plugins from loading jQuery
- Using window.onload with Ubermenu
- Post Comments with Ajax in WordPress
- grab or load text on demand
- Creating New Dynamic Fields for a Certificate (Number Generation, Code Referencing, and more)
- Ajax call not working in wordpress through a plugin
- Send Array from JS to php file then insert it in wp database through a plugin
- can’t unzip file
- Strange admin-ajax / CSS / $_SESSION issue
- wc_get_template_part doesnt display the content [duplicate]
- Jquery POST Ajax Return null data in wordpress
- How can I adjust my function so the page editor still loads in the backend?
- WordPress jQuery Post – Amending Variable Value Within Function Command
- How to get current cart values using WC_Shortcodes?
- get_post_meta shortcode returns empty field
- Calling PHP function with AJAX
- How do I use a plugin’s shortcode attribute value in another function?
- In a plugin, How to update a json file using ajax
- Cannot pass value variable to WP AJAX functions
- Ajax Call not Working in Plugin
- Why does my custom plugin only function correctly once per page?
- Hide content for specific users with id
- jQuery Ajax not loading page with ACF fields
- How to get a specific string from a url
- Can you add a shortcode to a custom post type that gets the post_title, post_content, etc. and then passes that to a plugin function?
- Why is my shortcode not working?
- update_post_meta is not working for me when I use e.preventDefault for update button
- Get Shortcode output to database for static post_content
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- How to use Datatable with Ajax when creating plugin on WordPress?
- How to avoid the 403 Forbidden error in a WP Plugin with Ajax and PHP
- wp-admin/admin-ajax.php 400 (Bad Request) plugin
- checkout stripe with plugin contact form
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- Ajax call to php function doesn’t work PHP code
- Get shortcode attribute for AJAX call
- Compare Ajax Data Results
- Conditional Fields depending on checkboxes
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- My ajax request don´t work and return 0
- WordPress environment not loading properly