Created
October 24, 2018 02:00
-
-
Save aliboy08/14b03efe32c09f7148d764ed76ff0368 to your computer and use it in GitHub Desktop.
Check if WP Query have more posts - useful for ajax
This file contains hidden or 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
function ff_check_more_posts($args){ | |
$args['showpost'] = 1; | |
$q = new WP_Query($args); | |
if( $q->have_posts() ) { | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment