-
-
Save billerickson/8b9d6c6b8974fc01a238 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* AJAX Load More | |
* @link http://www.billerickson.net/infinite-scroll-in-wordpress | |
*/ | |
function be_ajax_load_more() { | |
$data = 'Additional posts go here'; | |
wp_send_json_success( $data ); | |
wp_die(); | |
} | |
add_action( 'wp_ajax_be_ajax_load_more', 'be_ajax_load_more' ); | |
add_action( 'wp_ajax_nopriv_be_ajax_load_more', 'be_ajax_load_more' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment