Change redirection link if new post is created

This topic contains 3 reply and 2 voices, and was last updated by towhid 9 years ago
Viewing 3 Posts - 1 through 3 (of 3 total)
Author Posts
April 21, 2015 at 9:39 pm 41947
towhid Hello, After creating a new post in the frontend, the user should be redirected to the post he just created. I can set this in the WPUF settings, and it works fine. I want to add a success message too, so I want to add "?action=newprofilecreated" to the url. Already found a code for that in the WP forum of your plugin, tried to change it but it didn't work:
function some_callback( $post_url, $post_id ) {
	$new_url=$post_url.'#newprofilecreated';
	return $new_url;
}
add_filter( 'wpuf_after_post_redirect', 'some_callback', 10, 2 );
Any ideas why? Thank you
April 22, 2015 at 10:45 am 41984
towhid towhid

Hello Joshi,

I need to know in which file you have tried out this code? Theme or plugin? ‘#newprofilecreated’ is indicate what?

Thank you:)

April 22, 2015 at 4:10 pm 42020
joshi joshi

Hello towhid,

I put this code in the functions.php of the theme
Sorry, The code is “?action=newprofilecreated” instead of “#newprofilecreated”. I use this GET-Variable to display a success message on the page with the new created post of the user.

I have set the WPUF form to be redirected to the “newly created post”, which works fine.
What I want is just adding “?action=newprofilecreated” to this url.

function some_callback( $post_url, $post_id ) {
	$new_url=$post_url.'?action=newprofilecreated';
	return $new_url;
}
add_filter( 'wpuf_after_post_redirect', 'some_callback', 10, 2 );

Thank you

April 25, 2015 at 5:05 pm 42233
towhid towhid

Hello Joshi,

I am really sorry to say that wpuf_after_post_redirect filter does not works in WP User Frontend Pro version.

Thank you 🙂

Viewing 3 Posts - 1 through 3 (of 3 total)