WordPress redirection

WordPress redirection is useful in some situations. For example, wordpress redirects to the dashboard after login, and the WordPress logout redirect occurs when the use logs out, which takes the user to the login page . Anther example of wordpress redirection is  after you complete registration and  you may not want to stay on the registration page. Usually wordpress redirects user to the home page or to the previous page after registration.

WordPress realizes the redirection by doing the “template_redirect” action before loading the current template to display the page. If you want to redirect a page to another page, you should hook a function to the action. In that hooked function, you should check if the to-be-loaded page template is what you expect the redirection occurs on, if it is, redirect the user to the specified url. The redirection url can be provided as a GET or POST variable.

Did you like this?
Tip admin with Cryptocurrency

Donate Bitcoin to admin

Scan to Donate Bitcoin to admin
Scan the QR code or copy the address below into your wallet to send some bitcoin:

Donate Bitcoin Cash to admin

Scan to Donate Bitcoin Cash to admin
Scan the QR code or copy the address below into your wallet to send bitcoin:

Donate Ethereum to admin

Scan to Donate Ethereum to admin
Scan the QR code or copy the address below into your wallet to send some Ether:

Donate Litecoin to admin

Scan to Donate Litecoin to admin
Scan the QR code or copy the address below into your wallet to send some Litecoin:

Donate Monero to admin

Scan to Donate Monero to admin
Scan the QR code or copy the address below into your wallet to send some Monero:

Donate ZCash to admin

Scan to Donate ZCash to admin
Scan the QR code or copy the address below into your wallet to send some ZCash:

Leave a Reply