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;
}
Related Posts:
- Current post’s author name in the author meta tag
- A Specific Blog post to be assigned as the landing page of my wordpress blog
- Can I change the contents of a description meta tag generated by Yoast?
- A solution to set metatags with my page generating plugin?
- WordPress plugin for nicer looking slugs? Have multiple pages named the same but they get different slugs
- Getting error when trying to implement site-wide breadcrumbs in Twentytwentyone Theme [closed]
- Add meta noindex to post if it has a specific taxonomy
- How to remove role=”navigation” from all nav elements?
- Change title only in dynamic page
- Category title output before opening title tag
- Seo Friendly Filter URLs
- How to add no follow to specific links?
- WordPress yoast seo plugin – parse snippet var in meta description
- .html end of URl affected to SEO?
- Can’t change website Title on wordpress
- Nginx WordPress and another Web app URL structure
- Genesis / custom template page / setting the page title and meta desc
- Get All In One SEO Pack to use custom field instead of Content
- Create a slug for a page in WordPress
- Workaround for og:image unsupported webp image type, Yoast SEO?
- Obfuscate links (for SEO purpose) [closed]
- Custom URL for multiple categories hierarchy
- 404 on old link after changing post url
- Tag title not being returned in page title of tag archives
- Retrieve alt text by referencing the img src
- Add missing alt tag to featured images for “storefront” theme
- Redirect homepage /page/1/ to /blog/page/1/
- Magento and WordPress URL integration [closed]
- Wrapping the_content() in Schema articleBody tag? [closed]
- Custom HTML/CSS Theme into WordPress – SEO considerations
- seo meta description issue in google search
- How to modify default tags in wp_head()
- How to update custom fields using the wp_insert_post() function?
- WordPress PHP version requirements
- Removing Default Gutenberg Blocks, But Keeping Reusable Block Functionality?
- Uninstalling a plugin: delete all options with specific prefix
- How to add some custom HTML to the edit posts page
- Add Useragent to the body class?
- How to get the list of WooCommerce product image of a certain category from database?
- How to override an unpluggable parent theme function?
- How can I get an XML export of my 1K+ posts WordPress instance?
- Display a text message if the shortcode is not found?
- Can i check if user is doing any ajax request?
- WordPress customizer: load controls in a custom div
- Passing PHP Variables to JS using Localize Script
- Is it unsafe to put php in the /wp-content/uploads directory?
- How to Populate the list of custom post type categories
- Exclude pages with certain template from wp_list_pages
- Is Auto Post recognition a WordPress feature? How to turn it off?
- List authors with posts in a category
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- Understanding WordPress child theme custom JS loading
- Problem with ACF shortcode with Repeater Field in WordPress? [closed]
- Generating a random number on every post and saving it in database
- Dynamically add styles to WP TinyMCE editor
- How to make a variable available for the duration of the page request
- How to get Poster (thumbnail) Image of Video
- Include a specific post to the query_posts and remove it if it is already in the returned list
- Fatal error: Call to undefined method WP_Error::get_item_quantity()
- javaScript in section of WP API
- Autogenerate shortcodes from an array of strings
- Remove annoying WP Adminbar CSS
- API response to be stored locally
- Warning: Use of undefined constant HTTP_USER_AGENT – assumed ‘HTTP_USER_AGENT’ (this will throw an Error in a future version of PHP)
- How to convert objects into arrays
- PHP code to call image Caption, Alternative Text, and Decription?
- Removing unneccessary p-tags (Not every p)
- Integrate WordPress in Yii
- wp_kses and magic quotes
- Customize Plugin
- How to rewrite URL with PHP variables with htaccess to a normal looking URL?
- Huge debug.log because of “undefined offset in media.php”
- display month in french in wordpress/php?
- Retrieving Author ID in wp-admin area
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Can’t get wp_insert_post to work
- Why not yield/iterable in posts interface?
- Part of title duplicating but not sure how to remove from code – help?
- Create a hierarchical taxonomy list in WordPress
- Randomly Assign an Image’s Alt Text Based on Data From Post
- Adding custom directory and PHP files in wordpress
- How can I Add a variable PHP in the Menu Nav
- Pull the content out of a page
- PHP Fatal error: Uncaught mysqli_sql_exception: Table doesn’t exist in wordpress/wp-includes/wp-db.php
- Adding an Avatar to the Top Nav Bar
- How to add seperate classes to no-search-result and found-search-result pages on wordrpess search – is_search()
- Edit incorrect password message WordPress
- Avoid parallax images hardcoding
- The response is not a valid JSON response, wordpress problems?
- Firing schema via code in functions.php doesn’t work
- A non-numeric value encountered in /wp-includes/functions.php on line 68
- XAMPP-VM Mac OS Mojave wordpress debugging using XDebug
- How to get original custom taxonomy slug after the slug has been rewritten?
- WordPress Persistent connection rule does not work for “posts”
- Blog posts repeat
- Ajax load more button for comments wordpress
- WordPress & Fastcgi proper setup?
- Dot is not added at the end of href
- Update user profile information from functions.php
- Getting error when using wp_insert_post()