Check if current user has a post and that post has any term/s from a specific custom taxonomy outside the loop

Question

I’m looking for a way to check if (whilst outside the loop) the current user..
1. is logged in
2. has a post published
3. their post has any term/terms from a custom taxonomy

I have this so far…

<?php if (( 1 == count_user_posts( get_current_user_id(), "post" ) && is_user_logged_in() ) { ?>
blah blah
<?php } ?>
0
, , , Pete 2 years 2019-11-22T20:05:39-05:00 0 Answers 91 views 0

Leave an answer

Browse
Browse