Skip to main content

Unanswered Questions

970 questions with no upvoted or accepted answers
2 votes
0 answers
840 views

Auto Load New Posts

Currently pulling in my posts on to a static page via ajax and a wp page template. <?php get_header(); ?> <div class="row"> <div class="col-md-6 feed-left"> <div id="post-list"&...
2 votes
0 answers
2k views

admin-ajax.php returning error 400 namespaced callback

I'm writing a plugin and I'm getting an error 400 Bad Request from admin-ajax.php. I did some poking around in the Wordpress core about this and it seems where it's getting hung up is around line 85 ...
2 votes
1 answer
489 views

AJAX in Wordpress, sending coords data to MySQL and show after into map

I've spent some months trying to figure out how to get users geolocation and pass it into MySQL and so after being shown with markers on the map. I've got stuck already in passing the data through ...
2 votes
0 answers
3k views

Woocommerce update product price via AJAX

I'm trying to update price of a product added to CART. I can easily change quantity in the CART, but price doesn't work at all. function total_count($cart_object){ $total_cart = intval($_POST['...
2 votes
0 answers
3k views

WooCommerce: update custom fields after checkout validation failure

In my project I'm customizing some of the WooCommerce features. My "shipping methods" are: 1. delivery 2. take away I also added a custom field in the checkout page that is a <select> populated ...
2 votes
0 answers
168 views

How to get sidebar's content inside admin-ajax?

I'm using a modal to display some content via an admin-ajax request. Now I have problem outputting the content of a sidebar (text widgets, used for adding advertisement scripts). When I directly use ...
2 votes
0 answers
385 views

Access/update database with jQuery

Goal: Update wpdb each time a user clicks on a specific button. Every time a user clicks on a button, I need jQuery to run a function that will update my wordpress database. As far as I understand, ...
2 votes
0 answers
1k views

load next and previous posts by Ajax and URL update

In my wordpress site, I have next/prev link in single.php , I want to ajaxify them and i found below script and it's working but it's not changing the new post URL(URL not updaing). After 2 hours ...
2 votes
1 answer
3k views

how load content as pop-up using ajax

There's a way to use ajax to load the content from single.php or a custom .php like ajax-single.php like this page does it: https://yellowimages.com/all/objects/apparel-mockups/ also like them show ...
2 votes
0 answers
931 views

woocommerce target button with class after ajax update

I'm working on a eshop using woocommerce. I have an add to cart button with class "single_add_to_cart_button", and a variations select list with 3 sizes. When I select a size which is unavailable, ...
2 votes
0 answers
2k views

WP_Query & AJAX

When calling wp_query via AJAX and passing a category ID and search parameter, the query does not return any posts. On page load, the query runs fine, which runs the same query. If I add these ...
2 votes
0 answers
1k views

Sticky Post default functionality with WP_Query is ignored when using AJAX

I am writing custom ajax pagination for a Blog archive page and I am running into an issue with sticky posts. The default functionality of sticky posts when using a WP_Query call is to sort all ...
2 votes
1 answer
172 views

How can I reuse the Wordpress search form for a custom plugin / widget?

I need to develop a custom widget to display posts, based on their ID. The user must be able to handpick posts. Right now, they can enter the post ID, but it is not convenient for them. Is it ...
2 votes
0 answers
959 views

Passing jQuery value using Ajax to a page template

I have the following jQuery code:- jQuery('.fancymember').on('click', function() { var member = jQuery(this).parent('div').parent('div').find('.test').val(); var dataString = 'member='+ ...
2 votes
0 answers
2k views

AJAX image upload with a upload progress bar using media_handle_upload

I currently have post image upload for the featured image from front-end form. <input type="file" name="wh_image_upload" id="wh_image_upload" multiple="false" /> and using media_handle_upload ...

15 30 50 per page
1 2
3
4 5
65