Redirect to custom URL after registering from a page with registration form

I have this form in a page template <form action=”<?php echo site_url(‘wp-login.php?action=register’, ‘login_post’) ?>” method=”post”> <div class=”formrow requiredRow”><label id=”FullName-ariaLabel” for=”txt_FullName”>Full Name</label> <input class=”required” id=”txt_FullName” title=”Full Name. This is a required field” type=”text” name=”first_name” /></div> <div class=”formrow requiredRow”><label id=”FullName-ariaLabel” for=”txt_FullName”>Email</label> <input class=”required” id=”user_email” title=”Full Name. This is a required field” type=”text” name=”user_email” /></div> <div class=”formrow requiredRow”><label … Read more

template_redirect causing infinite loop when get_queried_object is called

I have a situation where I am calling get_queried_object() in the ‘wp’ action hook and it is causing an infinite 301 redirect. I can temporarily fix this by adding: remove_filter( ‘template_redirect’, ‘redirect_canonical’ ); but I know this is a temporary fix because this disabled the auto redirect 404 errors. http://www.mydigitallife.info/how-to-disable-wordpress-canonical-url-or-permalink-auto-redirect/ http://docs.dev4press.com/tutorial/wordpress/canonical-redirect-problem-and-solutions/ The error seems to … Read more

How to Redirect login User with Mapped Domiain Primary blog Url to Original Sub-site Url

I have the following code which redirects a user of a multi-site to their respective sub-site based on their primary blog url when they log in from the main site. add_filter(‘login_redirect’, function($redirect_to, $request_redirect_to, $user) { global $blog_id; global $current_user; if (!is_wp_error($user) && $user->ID != 0) { $user_info = get_userdata($user->ID); if ($user_info->primary_blog) { $primary_url = get_blogaddress_by_id($user_info->primary_blog)/* … Read more

How to redirect to previous page in Ruby On Rails?

I have a page that lists all of the projects that has sortable headers and pagination. path: /projects?order=asc&page=3&sort=code I choose to edit one of the projects path: projects/436/edit When I click save on that page, it calls the projects controller / update method. After I update the code I want to redirect to the path … Read more

WordPress blocking/preventing viewing of .cgi file in subdirectory [closed]

Closed. This question is off-topic. It is not currently accepting answers. Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question? Closed 6 years ago. Improve this question I have a .cgi file, /data/displayQuery.cgi, … Read more

Stuck in redirect loop after using wp_login action

I’m stuck in a WordPress redirect loop which happened after hooking into the wp_login action. The strange thing is that I’ve already removed the piece of code in question, cleared cookies and restarted computer and servers – but the problem remains. They started immediately after I added this piece of code: function check_login_redirect() { if( … Read more