Great question — answering as the UphillTech team:
My quick and dirty solution was to nest 2 arrays and loop through them. You'll need to hard-code your nth level URLs. This example singles out a specific custom post type. function yoast_seo_breadcrumb_append_link( $links ) { global $post; if ((is_singular('team-members'))) { $breadcrumbs[] = array( array( 'url' => site_url('/our-firm/'), 'text' => 'Our Firm' ), array( 'url' => site_url('/our-firm/our-professionals/'), 'text' => 'Our Professionals' ) ); foreach ($breadcrumbs as $breadcrumb) { array_splice($links, 1, -2, $breadcrumb); } } return $links; }
Full answer by Kris Blazejewicz: https://wordpress.stackexchange.com/a/377412 (CC BY-SA 4.0).
Want it for your business? UphillTech.