Skip to main content
3 of 3
added 240 characters in body
bosco
  • 7k
  • 3
  • 27
  • 47

The is_author() conditional can be used to check if the query is targeting an author's page. By passing one or more User IDs/nicenames into it, it will check for specific author pages. So to check if the current author page is for the current user, it can be passed the return value from get_current_user_id():

if ( is_user_logged_in() && is_author( get_current_user_id() ) ){
  echo "belongs to current user ";
}
else {
  echo "not belongs to current user";
}