A couple of problems-
setup_postdata
doesn’t work with any variable other than $post
, so that line is doing nothing. This is explained on the Codex page for setup_postdata
.
get_the_ID
doesn’t accept any arguments, but it doesn’t matter, you’ve already got the ID in $event->ID
, just change all instances of get_the_ID($event->ID)
to $event->ID
.
Related Posts:
- How to put JQuery/Ajax inside shortcode?
- 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
- 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
- How can I pass a variable to wp_ajax action?
- How to pass JavaScript variable to PHP in wordpress widget?
- jQuery AJAX call not executing in Plugin
- 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)
- Add jQuery to WordPress page
- How to use wp-ajax in wp-cron
- Why is my ajax call refreshing the page?
- What’s the point of using WordPress’s built in admin-ajax.php?
- Admin-ajax.php is dying “0” without processing function
- Ajax with jQuery UI dialog not working
- 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
- Check if email address exists front end with AJAX in a plugin
- Pass a php string to a javascript variable
- WordPress Ajax Callback
- WordPress Plugin Page is Loading in Admin Content Container Instead of Separate Page
- Shortcode button dosent work for all posts. Work for first post only
- Notepad sticky plugin
- Form isn’t inserting data into database with ajax plugin
- Adding a slider captcha to the comment system
- Error with Image Slide plug-in/ s3slider in WP
- wordpress site | All-in-one-cufon IE Issue
- Using a custom plugin to capture input data via Ajax and PHP
- WordPress function not being called from jQuery method
- Ajax contact form widget plugin data not insert in database
- Ajax call returning 0
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- How to prevent plugins from loading jQuery
- Using window.onload with Ubermenu
- Post Comments with Ajax in WordPress
- how to insert data in wordpress table usnig jquery ajax
- How to include this jQuery File in wordpress?
- Call plugin with php function
- JQuery prepend a function
- Is there a function to list all uploaded images? How can I add one?
- coding a WordPress AJAX Form using PHP to check if User is Logged Out and Show error
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Save user total active time after login in wordpress [closed]
- Asynchronous request in wordpress
- Api external with wordpress
- Plugin not working locally, but works on server
- Custom meta box with jQuery.sortable custom post type list
- How to include my Ajax calls in one function instead of calling different ones every time?
- Using AJAX to run SQL statement and populate dropdown
- Ajax call not working in wordpress 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
- Calling PHP function with AJAX
- 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
- 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?
- JS working when used normally but not in wordpress
- update_post_meta is not working for me when I use e.preventDefault for update button
- 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 ()”
- 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
- Creating new option (add_option) from AJAX – Settings API
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Not getting result using ajax on wordpress
- What is the process for reimplementing a back up WordPress?
- Like/Dislike Bar not working when updating
- display user input using ajax in wordpress
- Ajax, jQuery and WordPress
- PHP and Jquery pass value from form. Update function on DataBase
- WordPress plugin ajax post parameter
- Pulling Advanced Custom Fields from other pages
- Response from Php File to Ajax is not getting sent
- Plugin use of ajax/jquery depending dropdown
- How do I output user_registered time in my correct timezone?
- Load css classes after using ajax calls
- wordpress jquery is not defined because the head tag is empty
- WordPress portfolio pagination on home page
- Ajax button “Load more” is not loading correct language version posts for logged out users
- How do I call an action hook into wp_ajax hook callback function