You can do something like this to redirect everyone that enter to the wp-login.php
Notice that its redirect only when the request is GET so you could still can enter if you post to there. its in the case that you use this wp-login.php with your custom login page.
function login_page_redirect() {
$redirect_to = "http://google.com"; // url where to redirect
$page = strtok(basename($_SERVER['REQUEST_URI']), "?");
if( $page == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET') {
wp_redirect($redirect_to);
exit;
}
}
add_action('init','login_page_redirect');
Related Posts:
- How to fix “Headers already sent” error in PHP
- What are PHP extensions and libraries WP needs and/or uses?
- How to get WordPress Time Zone setting?
- how to get page id of a page using page slug
- How to stop form resubmission on page refresh
- the_author_meta() vs get_the_author_meta()
- Displaying a WooCommerce product via PHP
- Enqueue Javascript Correctly for 3.5
- How to get the ID of an item in an audio playlist?
- Does wordpress allow me to add a php file to the root directory to execute custom scripts?
- Add footer.php to WordPress child theme
- how to display active, upcoming and past event with featured listing with pagination
- JS completely stopped loading but Files are found
- How to Explode a Textarea Field and Echo each line separately, wrapped with HTML
- Import 10,000 Users into WordPress WITH a specific ID for each user
- do not show web page section when using advanced custom fields pro
- Restrict WordPress File Type Uploads by User Type
- How to slow down server response
- Click loads template via ajax
- Why isn’t the canonical link element used for all pages?
- Get all user meta by meta key instead of ID
- How Can I Call Up The Author’s Name on a Post
- how can i show only the parents in owl-carousel?
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Use menu link or onClick to set a variable
- Automatically remove a canceled order in Woocommerce
- How to pass arguments to add_action() or retrieve return value of called function?
- Get WordPress Category ID from a URL string
- How to remove the cufon script from Dzonia Lite theme [closed]
- Seach custom post type posts only by meta fields?
- Create highly customized submenu (possibly using wp_list_pages)
- Display a message if posts dosen’t exist on loop
- Change WordPress Upload Folder using wp handle upload
- Why doesn’t add_filter have the option to include a callback for each run?
- Sending a custom form data in email through WP Mail Function
- Disable plugin function to use my own
- Normal PHP array for exclude section of WordPress query?
- Force Users To Relogin
- Security updates to 3.3.2
- How to add PHP code in functions.php wordpress
- How do I run code every 24 hours?
- How to add page numbering with php?
- Echoing a CSS class based on category of post in a list
- If user is logged in not working
- Custom User Registration script only allowing usernames with 16 characters
- PHP- Why is my contact form keep showing it is invalid? [closed]
- How to Make Thumbnail of Post Stay Animated
- Compare current post Category in select menu
- Get quantity of children in all parents and add quanity to all UL class names
- How to display already created menus via php?
- How to store checkbox data for individual users?
- Grabbing Image name From Product Image Gallery
- WordPress database html table with pagination
- Test the existence of a page/article by its URL, taking in consideration the URL rewriting by filters
- Prepend to all image URLs with PHP, only for mobile devices
- Cant get blog name with get_option
- Force REST API Authentication for each request method
- how to add new PHP page in WordPress plugin
- How can I get my WordPress plugin to receive data and relay it in an ajax/php request to a remote server that requires authentication?
- Time out opening second page in same browser with long running page load
- How to display category and tag descriptions in a post
- Can’t display anything through homepage text editor
- Issue with json decode in WordPress – value is not returning consistently
- Extra editor on top of default in Custom Post Type
- Adding if statement
- Pagination 404 error(I have refreshed the permalinks and tried several previous options)
- How Can I Display the Last Modified Date for User Profiles on WordPress?
- Editing the term_order field
- Input field duplicates on form submit by jQuery
- How do I fix this error
- Ajax wordpress function showing source code in alert and not value of input field?
- Get Posts by Custom Taxonomy on Custom Post
- Is it possible to dupplicate a WordPress post with php?
- How to create a radio button to alt between settings in wp_options table
- I want to use wordpress database in android app using json encode?
- get_post_meta with variable
- if user is admin display admin link and logout link else display logout only
- site_url() returns with additional backslashes
- Adding instant search to wordpress page
- If Month=Particular month display content [closed]
- Name Input from widget displays Sidebar name instead of saved data
- WP multisite network plugin fails to see classes loaded with spl autoload
- Change order that the menu is generated with wp_list_pages
- Using variables as href in anchor tags (PHP) [closed]
- What’s the .php file which generates the Custom Background page in the admin panel?
- What is this mark for “? function()” [closed]
- Parse error: syntax error, unexpected ‘else’ (T_ELSE) [closed]
- Code working in functions.php but not pluign for gavity forms
- Change an option string to a function [closed]
- wordpress.org disallowing my plugin becuase of loading core files in cron cpanel file
- get_body_params() is always empty in POST request
- Warning: Attempt to read property “term_id” on int – Woocommerce
- Headers already sent error with get_template_part in REST API call
- How to fix wordpress after update to php 8.1?
- How to translate the blog date in the Avada theme [closed]
- Custom WP LIST Table filter
- WordPress online courses system
- Redirect posts to post editor page based on query string
- How do I stylize selected comments?
- Displaying generated HTML within a WordPress site