The users have to be redirected to a custom URL which I already know (its part of the programming logic). I just need to know which WP function to use/ what php code to use to redirect the user to the new URL. This code will be executed within a php function in functions.php--> that function will first do some processing, and then send the user to the new URL
How do I do the above?
Note-- I tried using wp_redirect but it does not work.
This is the code I tried to use (that did not work)--
$redirecturl = get_post_type_archive_link('property');
echo "\n\n Redirect URL for property posts=" + $redirecturl;
wp_redirect( "http://" . $redirecturl + "?post_type=property&search_keyword=" + $search_keyword ;
wp_redirect()
.Output Buffering
, if you really need toecho
something - take a look here: stackoverflow.com/questions/3766353/…