How to count_user_posts for custom post type
-
I have this conditional snippet that counts if the current user has published any normal posts. How would this be updated to count if the current user has published any custom posts?
<?php if ( 0 == count_user_posts( get_current_user_id() ) && is_user_logged_in() ) { ?> do something <?php } else { ?> do something else <?php endif; ?>
Thanks,
Pete
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to count_user_posts for custom post type’ is closed to new replies.