Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Redirect Archive Pages to Homepage
- */
- function redirect_to_home( $query ) {
- if( !is_admin() && is_archive() ) {
- wp_redirect( home_url() );
- exit;
- }
- }
- add_action( 'parse_query', 'redirect_to_home' );
- ?>
Add Comment
Please, Sign In to add comment