WordPress.org

Ready to get started?Download WordPress

Forums

Where is wp_meta function defined? (5 posts)

  1. ganzua
    Member
    Posted 7 years ago #

    Hi!

    I'd like to change the links that <?php wp_meta(); ?> shows in the sidebar after you login in wordpress.

    By default it shows two links;

    Site admin (a link to /wordpress/wp-admin/)
    Logout (a link to /wordpress/wp-login.php?action=logout)

    I'd like to change the Site Admin link to another page for every user but the administrator.

    Where is wp_meta function defined?

  2. ganzua
    Member
    Posted 7 years ago #

    Nevermind, it is in /wp-includes/general-template.php -> line 54

  3. whooami
    Member
    Posted 7 years ago #

    I knew that, but didnt want to point it out since youre doing that assbackwards. The smart way to do what you want to do is to use an if/else statement inside your theme.

  4. ganzua
    Member
    Posted 7 years ago #

    "The smart way to do what you want to do is to use an if/else statement inside your theme."

    -> could you please explain further? :) I can't figure it out

  5. ganzua
    Member
    Posted 7 years ago #

    What I'm trying to change is the "site admin" link in this way;

    if admin logged in then link to /wordpress/wp-admin/

    else link to /wordpress/bbpress/profile.php?id=1 (I'd need too add the user id to the /bbpress/profile.php link)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags