Prevent access to single post types

The fast way

In your .htaccess add a rule

RedirectMatch Permanent ^/press/.+ /press/

Plugin way

Hook into template_redirect and redirect all requests to a single entry:

add_action( 'template_redirect', 'wpse_45164_redirect_press' );

function wpse_45164_redirect_press()
{
    if ( ! is_singular( 'press' ) )
        return;

    wp_redirect( get_post_type_archive_link( 'press' ), 301 );
    exit;
}

(Caveat: not tested)

Leave a Comment