You can use get_the_author_meta()
which returns the requested data of the author of the current post. If you’re on the author archive page (e.g. author.php) that will be the ID of the user whose profile you are on.
get_the_author_meta( 'ID' );
You can use get_the_author_meta()
which returns the requested data of the author of the current post. If you’re on the author archive page (e.g. author.php) that will be the ID of the user whose profile you are on.
get_the_author_meta( 'ID' );