Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Disable Redirection to Specific Page
- */
- function my_wp_redirect($location) {
- // TODO: Change '10' to the page id that should not be redirected to
- $page_id = 10;
- if($location == get_the_permalink( $page_id ) ) {
- $location = false;
- }
- return $location;
- }
- add_filter('wp_redirect', 'my_wp_redirect');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement