Please write below code in functions.php function wp_rewrite_rules($wp_rewrite) { $rules = wp_generate_date_archives(‘CUSTOM_POST_TYPE_SLUG’, $wp_rewrite); $wp_rewrite->rules = $rules + $wp_rewrite->rules; …
Please write below code in functions.php function get_cpt_archives( $cpt, $echo = false ) // $cpt = custom post type slug{ …
Please write below code in functions.php add_action(“template_redirect”, ‘template_redirect_news’); function template_redirect_news() { global $wp; $custom_post_types = array(“faq” , “testimonial”); // please…