July 18, 2013 at 10:21 pm 6109
|Tareq Hasan||Hi all, Ok, I have a question I was hoping you would be able to help with. I am using WPUFPro with BuddyPress and also Theme My Login. I have four forms set up to allow users to upload Custom Posts with Taxonomies. After the user uploads/edits a custom post, I would like to redirect them back to their account to show them their posts. Now, I know there is a setting in each form to redirect them to either the post, same page, a different page or custom url. My issue is that because I am using BuddyPress and I need to include the username as part of the url. The address I want to send my users to is something like http://mysite.com/rescues/username/my-account. The '/rescues/username' element is added by BuddyPress and because every username is different, it means that I am unable to type out the required url. I am also unable to pick a specific page for the same reason. If I use the page that contains the [wpuf_dashboard] shortcode (in my case, my-pets) it will take me to http://mysite.com/my-account and omit the '/rescues/username' part. With Theme My Login, I am able to use '/%user-login%/' for redirections and it will retrieve the correct username. Would there be a work around like this for WPUF Pro? I hope all this made sense! :) Thanks Damien|
July 18, 2013 at 10:29 pm 6112
add_filter( ‘wpuf_add_post_redirect’, ‘wpuf_redirect_to_profile’ );
Paste the code in your themes functions.php and set the redirect to option to a page or any URL. This code will override the URL and redirect them to the buddypress user profile and adding/editing a post.
July 18, 2013 at 11:57 pm 6116
Excellent! Exactly what I was looking for!
Yet again, great customer support Tareq!
August 16, 2013 at 4:50 am 7009
I’m also in a similar boat, but this function doesn’t work for, most likely because the Edit page I’m trying to redirect my BP users to is one that was created manually. How would I go about redirecting one of my users from mydomain.com/edit/ to mydomain.com/members/username/movies/edit/ ?
August 16, 2013 at 10:24 pm 7031