Tag Info

New answers tagged


You can use the $_SERVER['HTTP_REFERER'] to check the page where it redirected from You can use it as below. if($_SERVER['HTTP_REFERER'] == "path-of-page-you-want-to-check"){ //Do something here } Conditionally you can call functions like is_home(), is_front_page() to run that block of code in homepage only


You need to use the login_redirect filter returning the redirect location: add_filter( 'login_redirect', 'redirect_to_home', 10, 3 ); function redirect_to_home( $redirect_to, $request, $user ) { if( $user->ID == 6 ) { //If user ID is 6, redirect to home return get_home_url(); } else { //If user ID is not 6, leave ...


use login_redirect hook instead login_form And you can move conditions inside your function like below code. function redirect_to_front_page() { global $redirect_to; if ( is_user_logged_in() ) { $user_id = get_current_user_id(); if ($user_id == 6) { /* redirect users to front page after login */ if ...


WAY #1 - cPanel I assume your host is using cPanel managing your Server. Browse domainname.com/cpanel, login their with cPanel credential: Change the values according the following image: Don't forget to check the "Wildcard Redirect" to redirect all the subfolder/subpages also (Thanks to @RobertHue). Add the redirection and you are done. WAY #2 - ...


Below query will help you to replace old pages to new domain : UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldsiteurl.com', 'http://www.newsiteurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';

Top 50 recent answers are included