Created
May 5, 2022 07:58
-
-
Save techies23/a495de98995c7e21b89aeeca30e1239c to your computer and use it in GitHub Desktop.
Redirect from "zoom-meetings" page to 404 or any other page
This file contains 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
//Paste below code to your theme's functions.php file | |
// Change 'your-desired-page' to something you want to redirect to | |
add_action('template_redirect', 'vczapi_redirect_archive_cpt'); | |
function vczapi_redirect_archive_cpt() | |
{ | |
if (is_post_type_archive('zoom-meetings')) { | |
wp_redirect('/your-desired-page', 301); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment