Created
April 4, 2017 18:50
-
-
Save AustinGil/ecde3a29afaadfae6bd5989becce244e to your computer and use it in GitHub Desktop.
Loading more posts with AJAX
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
/** | |
* AJAX load template part | |
*/ | |
function prefix_ajax_load_template_part() { | |
echo get_template_part('templates/ajax-template-part'); | |
die(); | |
} | |
add_action('wp_ajax_nopriv_ajax_load_initiatives', 'prefix_ajax_load_template_part'); | |
add_action('wp_ajax_ajax_load_initiatives', 'prefix_ajax_load_template_part'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment