Assuming your javascript and ajax action code are otherwise correct, target admin-ajax.php
with the correct path by localizing your enqueued script:
wp_localize_script(
'your_script_handle',
'script_data',
array( 'admin_ajax' => admin_url( 'admin-ajax.php' ) )
);
Then in your javascript, reference that URL with:
url: script_data.admin_ajax
EDIT-
ah, missed this the first time: $wpdb->feedmanager
isn’t set unless you’ve explicitly set it somewhere. $wpdb->table_name
only works for native tables, as those member vars are hard-coded directly into the wpdb class. change it to a string 'wp_feedmanager'
.
also note that the wp_
table prefix can be (and should be) changed via wp-config.php
, use $wpdb->prefix
to make your code more portable:
$table_name = $wpdb->prefix . 'feedmanager';
Related Posts:
- Help making my pagination plugin better
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- jQuery AJAX call not executing in Plugin
- 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
- How to create popup same as wordpress popup feature
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- jQuery Plugin to use WordPress functions in AJAX request
- Check if email address exists front end with AJAX in a plugin
- When to use action hooks and plugins
- Loading jQuery UI in the head
- Form isn’t inserting data into database with ajax plugin
- Adding a slider captcha to the comment system
- How to put JQuery/Ajax inside shortcode?
- Need to change url paramenter of share product pintrest [closed]
- Ajax contact form widget plugin data not insert in database
- WordPress Integration with Google Groups
- 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 color picker in plugin, does input attribute order matter?
- Post Comments with Ajax in WordPress
- how to insert data in wordpress table usnig jquery ajax
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- wordpress add_action() issue in ajax call
- How to display checked posts on another page over AJAX? (like comparasion style)
- Ajax save data to database on document ready, no data being saved
- 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?
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- Portfolio Slideshow Sliders Behaving Oddly When in jQuery Ui Tabs
- Using AJAX to run SQL statement and populate dropdown
- Ajax request sends url rather than data
- wc_get_template_part doesnt display the content [duplicate]
- Jquery POST Ajax Return null data in wordpress
- How do I reinit WordPress plugins dynamically using jS?
- WP Ajax DB issues
- Cannot pass value variable to WP AJAX functions
- Ajax Call not Working in Plugin
- jQuery Ajax not loading page with ACF fields
- JS working when used normally but not in wordpress
- main navigation menu disappear after adding jquery source file
- checkout stripe with plugin contact form
- WordPress Ajax request “Failed to load resource: the server responded with a status of 400 ()”
- WordPress Thickbox Navigation Issue in Gallery
- Overwrite js code using WP_Footer
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Overwriting Plugin’s Ajax callback function from theme
- Help with customising love it plugin (use within foreach)
- WordPress Feedback popup with date saved into table
- Not getting result using ajax on wordpress
- WordPress ajax not working in registration
- AJAX doesn’t pass variables to the php function in the plugin
- Like/Dislike Bar not working when updating
- Ajax, jQuery and WordPress
- Hyperlink to execute PHP
- How to get site homepage from plugin?
- Add jQuery in dashboard when is already added in main plugin page
- WordPress plugin ajax post parameter
- Load css classes after using ajax calls
- JQuery UI plugin not working in IE7?
- 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
- Ajax response from Media Selection does not update ALL information more than once
- How to ajaxify all pages of my Wp Site
- Simple ajax call not working in wordpress plugin
- Notepad sticky plugin
- Plugin Options Not Saving to Database in WP 4.5
- scrolltop always 0, can’t trigger script
- Bootstrap Drop Down menu is not working
- Doubt using $wpbd->get_col for a single column
- How can I implement an Add to Collection function on my Image Gallery to be downloaded later?
- Access WordPress database outside of WordPress
- How to create custom tables in WordPress using my own plugin?
- How to access data in wordpress database externally using php
- Best approach to fetch data from wp options to js file or php file
- Is it possible to create Custom Post plug-in?
- What’s the best way to implement AJAX in WordPress?
- How to Create a Custom Panel and Fields in Post Page [Plugin]
- custom changes removed after plugin update
- WordPress Settings Lost After Site Migration
- Plugin for a text modal box [closed]
- Help With MySQL to WPDB Query Conversion
- AJAX search posts and pages
- Can someone please tell me what is wrong with my plugin?
- Error with Image Slide plug-in/ s3slider in WP
- WordPress Ajax Posting from App
- Is there a way to set the default active tab on Post UI Tab pluggin?
- looking for navigation plugin (accordion) [closed]
- wordpress site | All-in-one-cufon IE Issue
- __callStatic method handler passed to add_action causes bug in PHP
- splitting the URL using jQuery
- custom user tables supported in SharDB plugin?
- Using a custom plugin to capture input data via Ajax and PHP
- WordPress function not being called from jQuery method
- Change upload folder for a CPT
- DROP TABLE with uninstall hook not working
- How to check if tables in WordPress still exists after activations
- How to tie dark mode with prefers-color-scheme webkit? [closed]