Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] create a link or redirect

Viewing 15 replies - 1 through 15 (of 15 total)

  • Henry Wright
    Moderator

    @henrywright

    Hi @dwsowash

    A simple HTML link can be created like this:

    <a href="http://gothicspider.com/members/username/profile/" title="Title">Link text</a>

    Is this what you mean? Or were you looking for something dynamic?


    bp-help
    Participant

    @bphelp

    @dwsowash

    if ( is_user_logged_in() ) {
    <a>Profile</a>//link to users profile
    }

    dwsowash
    Participant

    @dwsowash

    Hey! sorry. Thanks for the quick res response.
    Let me be a little more descriptive.
    I have a plugin that redirects users to their buddypress profile not their wp profile.(works great)
    I have a facebook,twitter,yahoo,ect login plugin but it wants to redirect to the wp profile page which it calls “your profile. I hade to make this page or it would give ma a 404.

    I’m tired of playing so I’m trying to meta refresh from the wp profile to the buddypress profile.

    Thanks!


    bp-help
    Participant

    @bphelp

    @dwsowash @henrywright
    Not sure why my code is getting stripped here now as I used the code tag in the editor but to support what henry suggested you can find snippets here:

    A few dynamic link examples


    Maybe what you need or maybe not.


    Henry Wright
    Moderator

    @henrywright

    function hello() {
        // Testing 123...
    }
    add_action( 'code_test', 'hello' );

    Henry Wright
    Moderator

    @henrywright

    @bphelp

    Humm, strange! As you can see, code tags seem to be working for me


    danbp
    Participant

    @danbp

    @bphelp,@henrywright,

    no not strange, you used a wrong opening tag for the code (' instead of `). I corrected it but your code was already stripped. Sorry for the stress ! 😉


    @dwsowash
    ,

    your above URL goes to http://gothicspider.com/members-3/ which can bring errors if you use a plugin who check for the BP members page. Correct this to /members/ in the page permalink to avoid some weird issues.

    Clear the Trash from previous created members pages. 3 indicates that you used 2 others before the actual.

    Concerning the profile redirection, once BP is activated, the site use by default the BP profile and the WP profile is no more accessible publicly. So i wonder what that plugin is for ?

    And for your issue with login, what plugin do you use ? As i think it would perhaps be easier to modify that plugin instead of WP/BP.


    dwsowash
    Participant

    @dwsowash

    Got rid of the members-3 Now it’s just members.
    Deactivated the BP Redirect to Profile for Buddypress and it redirects to WP-profile not the buddypress profile.


    dwsowash
    Participant

    @dwsowash


    danbp
    Participant

    @danbp

    What is redirecting ? BP Redirect to Profile is not updated since over a year and many things have changed since (given to be compatible to 1.7….)
    Also it was intended for:

    • Redirect all normal users to their profile on login
    • If the admin logs in from site front page,redirect him back to front page.
    • If the Site Admin logs in from site backend, i.e. using http://yoursite.com/wp-login.php, let him go to the WordPress dashboard

    You didn’t answered: what is the login plugin ?


    dwsowash
    Participant

    @dwsowash

    On login without the BuddyPress Login Redirect plugin enabled logging in redirects to http://gothicspider.com/your-profile/…(which is wp profile)

    With the plugin enabled users are sent to http://gothicspider.com/members/USERNAME/…which is buddypress profile)

    Either way if they login through facebook or twitter they land at http://gothicspider.com/your-profile/&#8230;.(which is wp profile)


    danbp
    Participant

    @danbp

    Do you use an old buddypress specific theme ? Do you use a custom function somewhere (functions.php or bp-custom.php) ? Do you use a child-theme ?

    Have you enabled Profile syncing in BP settings.

    On a default install, when a user log in, he’s not redirected to his profile.
    Can you test by deactivating all your plugins, except BP and with 2013 theme activated ?


    dwsowash
    Participant

    @dwsowash

    I use a theme not supported by buddypress.
    I use no custom functions.
    I do not use a child-theme.
    I have “disabaled” Profile syncing in BP settings.(because it seems to make no difference).

    “Can you test by deactivating all your plugins, except BP and with 2013 theme activated ?”
    Yes I can and will. But I’m trying to fight my way through with what I’ve got because I like the look and feel. If I can’t have the plugins and theme I’ve got now I might as well scrap the whole pile.

    I’m not trying to cast fault or blame I’m just looking for insight to what I might need to “hack”.


    dwsowash
    Participant

    @dwsowash

    All I’m trying to do is redirect http://gothicspider.com/your-profile/ to http://gothicspider.com/members/%USERNAME%/
    At that point I will call BuddyPress “Perfect”!


    dwsowash
    Participant

    @dwsowash

    “At that point I will call BuddyPress “Perfect”!”
    Well…I’m calling BuddyPress “Perfect”!

    I’m using the Social Connect plugin because I like the look of its FB and Twitter buttons but it wanted to redirect users to the WP-profile page. So I gave it this meta refresh
    “<meta http-equiv=”refresh” content=”0;url=MYSITE/members/[php]$current_user = wp_get_current_user();echo ” . $current_user-user_login . ”;[/php]“>”

    and it works like a charm.(I know it’s a hack but….)

    So now my plugin from my login page(screen shot) lands at the correct BuddyPress profile page(screenshot)
    You can mark this resolved!

    Fantastic!
    Have a nice day!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘[Resolved] create a link or redirect’ is closed to new replies.
Skip to toolbar