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?
- PHP Deprecated: Non-static method should not be called statically
- Loading shortcode with ajax
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- 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
- Errors while using ajax from external wordpress page
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Why is my ajax call refreshing the page?
- Admin-ajax.php is dying “0” without processing function
- How to create popup same as wordpress popup feature
- Ajax with jQuery UI dialog not working
- Shortcode in AJAX popup
- How to add pagination to wpbakery grid?
- jQuery function didn’t work in my plugin
- Shortcode to generate and save password in a file
- Check if email address exists front end with AJAX in a plugin
- Confused about shortcode and settings values
- Running jquery script after shortcode [closed]
- WordPress Ajax Callback
- WooCommerce get_price returning wrong price when used via ajax
- Notepad sticky plugin
- Form isn’t inserting data into database with ajax plugin
- Error with Image Slide plug-in/ s3slider in WP
- 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
- Nested shortcode functions accessing variable
- Ajax call returning 0
- 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?
- Using window.onload with Ubermenu
- Create shortcode to echo javascript
- how to insert data in wordpress table usnig jquery ajax
- Redirect to another page using contact form 7? [closed]
- What is @Action in WordPress?
- How to include this jQuery File in wordpress?
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- Does having more than 30 Admin Ajax affects site performance (plugin)?
- How to display checked posts on another page over AJAX? (like comparasion style)
- Adding media upload button to User Profile page (following a tutorial)
- Is there a function to list all uploaded images? How can I add one?
- Custom shortcode for displaying user based on a role parameter
- How to get specific string/value from an array? php [closed]
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Save user total active time after login in wordpress [closed]
- Shortcode to pull posts
- Shortcode not working – quotes seems strange
- Get all the URLs of the pages that uses a specific shortcode
- Api external with wordpress
- Passing PHP Variables to AJAX Loaded Pages
- How to prevent tabs from opening all at once
- Echo out element to another page.
- Ajax request sends url rather than data
- grab or load text on demand
- Send Array from JS to php file then insert it in wp database through a plugin
- Strange admin-ajax / CSS / $_SESSION issue
- wc_get_template_part doesnt display the content [duplicate]
- How to get current cart values using WC_Shortcodes?
- get_post_meta shortcode returns empty field
- In a plugin, How to update a json file using ajax
- Cannot pass value variable to WP AJAX functions
- Why does my custom plugin only function correctly once per page?
- Hide content for specific users with id
- How to get a specific string from a url
- Why is my shortcode not working?
- Use AJAX to fetch Current Post Thumbnail for WordPress when Uploaded throughMedia Uploader Frontend
- How to avoid the 403 Forbidden error in a WP Plugin with Ajax and PHP
- 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
- WordPress environment not loading properly
- Creating new option (add_option) from AJAX – Settings API
- WordPress Feedback popup with date saved into table
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Not getting result using ajax on wordpress
- WordPress ajax not working in registration
- Posting code inside the post instead of in the template file using shortcode
- How do I convince this button to do something when it is clicked?
- Like/Dislike Bar not working when updating
- How to Set Limit with WordPress Get Bookmarks Shortcode
- Help me with my first very basic plugin
- How do I output user_registered time in my correct timezone?
- Shortcode return is printing a 1 afterward
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Jquery post responses 500 error after some time and lastly an 503 error
- Ajax button “Load more” is not loading correct language version posts for logged out users
- cURL External API request displays content above other content on page
- How to get URL param for pagination in shortcode?