How to link a button to author's posts page
-
Hey all! I have a question that hopefully has a simple answer. I wanted to manipulate one of my buttons to take the logged in user to the page that shows their own posts.
For example, if user cindy203 was logged in, and she clicked the ‘my profile’ button, she would be automatically taken to wesbitename.com/author/cindy203
So, I already have the code for the My Profile button (which I copied from a logout button) and it looks like this:
$buttons[‘My Profile’] = ( $sl_options[‘redirect_logout’] == ‘custom’ && $sl_options[‘redirect_logout_url’] != ” ) ? wp_logout_url( $sl_options[‘redirect_logout_url’] ) : wp_logout_url( $this->current_url() );
I am looking to manipulate this to where the logged in user can see their posts. Where do I insert the link to pull up websitename.com/author/cindy203?
Thanks so much in advance. Any help would be appreciated.
-C
- The topic ‘How to link a button to author's posts page’ is closed to new replies.