This topic has 14 replies, 5 voices, and was last updated 9 years by Andrei.

  • Author
  • #48012
     mitchcan
    Participant

    Hey,

    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!

    #48013
     mitchcan
    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…

    #48520
     mitchcan
    Participant

    Hi, this was from a few days ago, does anyone have any guidance here? Thanks.

    #48538
     Andrei
    Moderator

    Firstly 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 solution
    #48641
     mitchcan
    Participant

    Hey 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.
    #48800
     Andrei
    Moderator

    Here 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 CODE
    
    function 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.
    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #49667
     mitchcan
    Participant

    Hello 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.

    #49971
     Andrei
    Moderator

    You’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 solution
    #51433
     PeterGould
    Participant

    Hi 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

    #67707
     ansleywilliams
    Participant

    Hi, 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?

    #68273
     Andrei
    Moderator

    Modifying 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 solution
    #68301
     ansleywilliams
    Participant

    I’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.

    #68317
     Andrei
    Moderator

    Well, 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 solution
    #68827
     lovemerge
    Participant

    redirect user to profile/group/2/ ( about me) so user can complete filling out extended form? when they register.

    #68992
     Andrei
    Moderator

    After 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
Viewing 15 posts - 1 through 15 (of 15 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?