Wordpress Ajax
How to create a wordpress ajax with easiest Example without plugin! Wordpress Ajax is used to show the content without page load. Actually some time web page occur lengthy and user have to scroll down the page again and again to see more content on page load so this situation make the user irritate and to avoid this type of problem we have a solution which called Wordpress Ajax. Let's see how wordpress ajax works? Here are 2 actions that used in Wordpress Ajax are wp_ajax_nopriv and wp_ajax. wp_ajax hook allows you to create custom handlers for your own custom AJAX requests. This only fires for logged-in users . If you need to also listen for Ajax requests that don’t come from logged-in users: wp_ajax_nopriv hook is functionally the same as wp_ajax, however it is used to handle AJAX requests on the front-end for unauthenticated users . Syntax: add_action('wp_ajax_nopriv_action_name', 'action_function'); add_action('wp_ajax_action_name', ' action_f...