Skip to content

Instantly share code, notes, and snippets.

@techies23
Created May 5, 2022 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techies23/a495de98995c7e21b89aeeca30e1239c to your computer and use it in GitHub Desktop.
Save techies23/a495de98995c7e21b89aeeca30e1239c to your computer and use it in GitHub Desktop.
Redirect from "zoom-meetings" page to 404 or any other page
//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