Try these steps: Step #1: Replace this: add_action( ‘init’, ‘custom_rewrite_rules’ ); function custom_rewrite_rules() { add_rewrite_rule( ‘testimonials/([^/]+)(?:/([0-9]+))?/?$’, ‘index.php?category_name=testimonials&name=$matches[1]&page=$matches[2]’, ‘top’ // The rule position; either ‘top’ or ‘bottom’ (default). ); } ..with this one: add_filter( ‘category_link’, ‘custom_category_permalink’, 10, 2 ); function custom_category_permalink( $link, $cat_id ) { $slug = get_term_field( ‘slug’, $cat_id, ‘category’ ); if ( ! is_wp_error( … Read more