Support » Fixing WordPress » Can I add an extra link to the Meta section?

  • Hi,

    I love WP but it irritates the heck out of me that when a user (subscriber role) logs in, he gets taken to the dashboard (which is useless for subscribers) and the only option he can click on is “Profile”.

    I solved part of this problem (thanks to Whooami) by modifying a bit of code that redirects users to the main page after logging in by changing a bit of code in wp-login.php:

    case 'login' :
    default:
    	if ( isset( $_REQUEST['redirect_to'] ) )
    		$redirect_to = $_REQUEST['redirect_to'];
    	else
    		$redirect_to = '/blogname'; (instead of 'wp-admin/')

    Now, what I would like to do is add a “Profile” link to the Meta sidebar that would take the user directly to his profile without going through the dashboard, for example (when logged-in):

    Settings (changed from Site Admin)
    Log Out
    Profile
    Entries RSS
    Comments RSS
    WordPress.org

    Thanks,
    Gene

Viewing 6 replies - 1 through 6 (of 6 total)
  • whooami

    (@whooami)

    Member

    you do that by using a checking if theyre logged in, and using a conditional. I could give you my code but its definitely outdated and pro’ly wont work for you.

    search for “is logged in” (w/o the quotes).. there is probably something within those threads.

    Thanks Whoo,

    Would you mind sharing your “outdated” code, being that I’m still learning, might help me a bit. BTW, would I be making the changes in my widgets.php file? That’s where I changed Site Admin to Settings.

    Cheers,
    Gene

    whooami

    (@whooami)

    Member

    Thanks, good stuff. Would I be looking for this in the widgets.php so it would apply to all themes (like I did with the Site Admin -> Settings change)?

    Cheers,
    Gene

    Sorry, it was in general-template.php

    Duhh…

    OK, fixed by changing one line in general-template.php, will post a hack for this.

    Thanks again,
    Gene

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I add an extra link to the Meta section?’ is closed to new replies.