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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)