• 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
    www.ads-software.com

    Thanks,
    Gene

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    Thread Starter raygene

    (@raygene)

    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

    Thread Starter raygene

    (@raygene)

    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

    Thread Starter raygene

    (@raygene)

    Sorry, it was in general-template.php

    Duhh…

    Thread Starter raygene

    (@raygene)

    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.