Code for Profile Activity?

I would like to create a simple link that places the user back at their profile activity page.
Something like 'site.com/members/'username'/activity/'
I just do not know what that code is though.
Everything I tried does not seem to work.
Thanks for the help.

  • gogger

    How do you want to achieve this? If its in a post or page created from the wordpress backend it may be a bit complex - but if its in a page template its quite simple. For example on my homepage for logged in users iv created a list of 'quick links' to parts in the profile i think they'll want to visit frequently i used the below code in a PAGE TEMPLATE file - this code wont work in a normal page/post form.

    This is the code i use direct a user to their edit profile section:

    <a href="<?php echo bp_loggedin_user_domain() ?>profile/edit/">Edit My Profile</a>

    You could modify it easily for your need:

    <a href="<?php echo bp_loggedin_user_domain() ?>activity">View My Activity</a>

    Note that <?php echo bp_loggedin_user_domain() ?> returns the url of the logged in users domain WITH a backslash at the end. So the below code would NOT work - note the / after the php call:

    <a href="<?php echo bp_loggedin_user_domain() ?>/activity">View My Activity</a>

    If you want to use this in a post/page creation form you could look into using a 'php in posts' plugin [search on wordpress.org]... but a lot of people advise against installing such a plugin.

    Hope this helps.

    Gogger.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.