How to redirect all pages of a custom post type [duplicate]

As stated by Milo it looks like it a duplicate of [How to disable the single view for a custom post type?]

<?php
add_action( 'template_redirect', 'subscription_redirect_post' );

function subscription_redirect_post() {
  $queried_post_type = get_query_var('post_type');
  if ( is_single() && 'subscription' ==  $queried_post_type ) {
    wp_redirect( pricingpageURL, 301 );
    exit;
  }
}
?>

Just swap our pricingpageURL with the pricing page URL value of your choice. Hope this helps.

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