-
Author
-
February 27, 2015 at 20:55 #48012
mitchcan
ParticipantHey,
I’d like to create a page redirect that goes to the specific – url/members/memberusername/ (and optionally …/profile/ or …/orders/)
I have this working in the menu setup with ##profile_link##/profile/ thank you; but I tried to use the link that I created for the menu and that did not work (maybe I needed to do something else, I tried with and w/o the url).
I looked at the code discussed elsewhere here for the login redirect, but that’s really what I need this for. I just want to have a site ‘page’ utilize the redirect option (like in either ‘Redirection’ or ‘Page Links To’ plugins, or direct w/o the plugin is fine too) to go to the ‘page’ (eg. url/members/memberusername/ ) that is the specific members information.
Is this possible?
Thanks!
February 27, 2015 at 20:57 #48013mitchcan
Participant“for the login redirect, but that’s really what I need this for.”
uh, should read “for the login redirect, but that’s NOT really what I need this for.”
sorry…
March 3, 2015 at 09:23 #48520mitchcan
ParticipantHi, this was from a few days ago, does anyone have any guidance here? Thanks.
March 3, 2015 at 15:03 #48538Andrei
ModeratorFirstly please let me know where you want to create this link and it doesn’t work, it would help me a lot to understand what you’re trying to achieve if you could give me access to your wp-admin, and pointing me directly to the issue.
Sorry for the late reply.
Looking forward.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 3, 2015 at 23:46 #48641mitchcan
ParticipantHey Andrei,
No worries, thanks for the reply. I am trying to create a link to the (current logged in users) profile page – where they would then be able make XProfile edits. In the menu, the following works in the URL of the tab:
##profile_link##/profile/edit/group/2/ (see screencap) and it takes me directly to that BuddyPress profile page and tab. (screencap 2)
How would I make this same thing happen in a page or post link?
Thanks.
Attachments:
You must be logged in to view attached files.March 5, 2015 at 01:00 #48800Andrei
ModeratorHere is a quick shortcode that i’ve made for you, it will do exactly what you need. Paste the follwing code in your functions.php file.
COPY CODEfunction bp_user_domain_func( $args, $content = '' ) { $args = shortcode_atts( array( 'path' => '', ), $args ); return '<a href="' . bp_loggedin_user_domain() . $args["path"] . '">' . $content . '</a>'; } add_shortcode( 'bp_user_domain', 'bp_user_domain_func' );
Then you can use it in your posts/pages in the following way:
COPY CODE[bp_user_domain path="profile/edit"]edit profile[/bp_user_domain]
Hope this is what you needed.
CheersHi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 11, 2015 at 11:34 #49667mitchcan
ParticipantHello Andrei,
I just wanted to followup and say, yes, this is great, it works to place the shortcode in a post or page (I just changed the path to be ‘profile/edit/group/2’ and it took me straight to that tab). Thanks!
The only thing I would add, is there any way that I can use this as a URL? If I wanted to set up a REDIRECT to go to that tab
how would I do that?where the URL would be based on the logged in user: //URL/members/THEUSERNAME/profile/edit/group/2/
Thanks.
March 13, 2015 at 01:15 #49971Andrei
ModeratorYou’ll have to use the functions that i’ve used in the above shortcode. Where/when would you like this redirect to happen ?
Looking forward.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionMarch 25, 2015 at 05:00 #51433PeterGould
ParticipantHi there,
I had the same question and added a nice little plugin that allows you to use the shortcode anywhere including URL’s.
Just add this plugin https://wordpress.org/plugins/user-shortcodes/
And then you can use the shorcodes to make custom URL’s
July 10, 2015 at 19:56 #67707ansleywilliams
ParticipantHi, I have this same question – I’d like to include in my welcome email to my new members a link for them to edit their profile so they’re taking directly to the page to edit their profile. How do I do this?
July 14, 2015 at 21:04 #68273Andrei
ModeratorModifying emails is totally another job, the content of emails usually reside in translations and the layout of the email can only be changed with an additional plugin.
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 15, 2015 at 00:18 #68301ansleywilliams
ParticipantI’m sorry I wasn’t clear. I already have a way to modify emails… I’m just looking for the link I would use to take a user directly to their edit profile page for the theme.
July 15, 2015 at 01:05 #68317Andrei
ModeratorWell, then this page already contains the answer you’re looking for.
You’ll either have to use the custom function I posted above or the recommended User Shortcodes plugin.Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solutionJuly 18, 2015 at 07:05 #68827lovemerge
Participantredirect user to profile/group/2/ ( about me) so user can complete filling out extended form? when they register.
July 20, 2015 at 00:07 #68992Andrei
ModeratorAfter they register they will firstly have to activate their account, so this won’t properly work.
Cheers
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution -
AuthorPosts
The forum ‘KLEO’ is closed to new topics and replies.