• Hi, I am having a problem with user profile link.

    Any new user after registration when clicking on their front end profile link ( /?author=id ) doesn’t get redirected to /author/username/.

    But the funny thing is if the user publishes at-least one post it works correctly. What’s changing after publishing the first post?

    This is the code used to generate users profile link:

    <?php } ?>
                <p class="youraccount"><a href="<?php echo get_option( 'home' ) . '/?author=' . $user_ID; ?>"><?php _e( "My Profile Page", "sofa_qanda" ); ?></a></p>

    Because it stays on the /?author=id url, button to edit their profile doesn’t display – witch is my problem. It displays correctly if I’m on /author/username/ URL.

    Code used for edit profile button:

    <?php
    	if( is_user_logged_in() ) { 
    
    		global $user_ID, $a_ID, $a_email, $l_nicename, $requested_author, $a_url, $a_jabber, $a_yim, $a_descr;
    
    		if( is_user_logged_in() && strtolower( $l_nicename ) == strtolower( $requested_author ) ) {
    
    			$jebber_corr = explode( '/', $a_jabber );
    			if( count( $jebber_corr ) > 1 ) $a_jabber = $jebber_corr[ 2 ];
    	?>

    Not sure if it’s permissions issue or something else?

    Website: https://bit.ly/jspq61

    Login: test PW: testpass

    Permalinks are set to custom /%category%/%postname%/.

    The theme I’m using: https://qanda.sofarider.com/

    Any help would be appreciated.
    Thanks

  • The topic ‘Edit profile button – frontend’ is closed to new replies.