Last active
May 13, 2020 10:59
-
-
Save zorem/a3392b2c1be707e8e9e42d8a32e956ce to your computer and use it in GitHub Desktop.
How To Change Redirect The 404 Error Page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* redirect 404 error page. | |
*/ | |
function redirect_404_to_otherpage($url){ | |
return $url = get_permalink('page id'); | |
} | |
add_filter( 'cbr_redirect_page_dir', 'redirect_404_to_otherpage', 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment