bbPress

Simple, Fast, Elegant

bbPress support forums » Themes

Linking to "edit profile" directly from logged-in.php

(5 posts)
  • Started 10 months ago by Lookfab
  • Latest reply from Lookfab
  • This topic is not resolved

Tags:

  1. The title says it. I'd like to have a link from the "logged-in.php" menu directly to the page where I can edit my profile (currently I first need to see the profile page and then edit from there).

    Essentially I need a function like bb_profile_link(); that returns the link to edit profile page.

    Thanks.

    Posted 10 months ago #
  2. You can put this at proper place in your logged-in.php

    <?php
    echo '(<a href="' . get_profile_tab_link(0, 'edit') . '">edit</a>)';
    ?>
    Posted 10 months ago #
  3. Thanks, but if I use this on the front page I get a user not found error. It does work if I use it from the profile page itself.

    BTW, I've modified the standard theme to put show this in a sidebar. That is, I call <?php login_form(); ?> from the sidebar.

    Posted 10 months ago #
  4. Sorry, my mistake

    <?php
    echo '(<a href="' . get_profile_tab_link(bb_get_current_user_info('id'), 'edit') . '">edit</a>)';
    ?>

    login_form() uses logged-in.php of current active theme if current user is logged in.

    Posted 10 months ago #
  5. Awesome! This works great.

    Thanks very much.

    Posted 10 months ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.