How do I remove unwanted pages like archive, search, etc.?

You could redirect anything that’s not a page or admin to home via the parse_query action:

function wpa_parse_query( $query ){
    if( ! is_admin() && ! $query->is_page() ) {
        wp_redirect( home_url() );
        exit;
    }
}
add_action( 'parse_query', 'wpa_parse_query' );

If it’s not an admin screen or a query for a page, it’ll redirect. You can see all of the types of pages this will remove under the Conditional Tags page in Codex.

Leave a Comment