WordPress Developer Ukraine, Kyiv
WooCommerce: Add to Cart Without Page Reload Using AJAX

WooCommerce: Add to Cart Without Page Reload Using AJAX

WooCommerce: add to cart without page reload using AJAX WooCommerce can add products to the cart without reloading the page, but a custom cart link in the header doesn’t know about it: the item count and total stay the same until the next page load. The woocommerce_add_to_cart_fragments filter fixes that by refreshing your cart markup…
WP_Query Loop: Incorrect Sort Order with AJAX Filters

WP_Query Loop: Incorrect Sort Order with AJAX Filters

WP_Query loop: incorrect sort order with AJAX filters A custom loop with AJAX filters sorted posts correctly for one post type and incorrectly for another. The query arguments were the same, which was a mystery at first. The culprit turned out to be a plugin that changes the order of posts for the post types…
How to Handle AJAX Requests in WordPress with wp_ajax

How to Handle AJAX Requests in WordPress with wp_ajax

Handle AJAX requests in WordPress with wp_ajax WordPress has its own AJAX entry point: every request goes to wp-admin/admin-ajax.php with an action parameter, and WordPress calls the PHP function registered for that action. All of WordPress is loaded, so in the handler you can use any function, check the user and work with the database.
AJAX live search in WordPress

AJAX live search in WordPress

AJAX live search in WordPress Adding AJAX to a search form makes the experience far more dynamic and user-friendly: results appear while the visitor types. This article walks through how to build one from scratch.
How send subscribe form on outer subscribe resource use AJAX

How send subscribe form on outer subscribe resource use AJAX

Submitting a subscribe form to an external service via AJAX When a subscription form posts directly to an external service, the browser takes the user away from the site on submit. Intercepting the form with AJAX and forwarding the data from the server lets you show a confirmation message inline without navigating away.