Author Page Archive Link for the Current User

WordPress has a handy function called get_author_posts_url() that returns the URL of the archive page for the author of the current post.

If you are looking for the same but for the current user, pass the current user’s ID into the function.

Like this:

get_author_posts_url( get_current_user_id() )

Here’s how you do the same in Bricks:


Get full access to all 220+ Bricks tutorials with BricksLabs Pro

Leave the first comment