If custom post type post not open in single

/* Flush rewrite rules for custom post types. */
add_action( 'after_switch_theme', 'jeba_flush_rewrite_rules' );

/* Flush your rewrite rules */
function jeba_flush_rewrite_rules() {
     flush_rewrite_rules();
}

Note: After add this function in your theme functions.php file active another default theme and reactive your current theme.

The following two tabs change content below.

Md Jahed

Latest posts by Md Jahed (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *