Thanks for suggesting a new feature for our plugin! Please submit feature requests to our GitHub repository for Yoast SEO. You will need an account to create a new issue for your feature request.
Please provide as much information about the feature request and don’t forget to include the URL to this conversation in your feature request!
This might be helpful:
I had empty page_for_posts option (as I had custom page for listing news), but each news generated invalid breadcrumb with id = ‘0’ as second element. Quick and dirty solution was to filter them out using this code:
add_filter( 'wpseo_breadcrumb_links', function ( $links ) {
$remove = null;
foreach($links as $i => $link) {
if (empty($link['id']) || $link['id'] == '0') {
$remove = $i;
}
}
if (!empty($remove)) {
unset($links[$remove]);
}
return $links;
});
-
This reply was modified 6 years, 8 months ago by
sajtdavid.
Hi,
We are unable to reproduce this with v12.2 of Yoast.
We went to an attachment page and it showed the breadcrumbs. See image: https://pasteboard.co/IzXRSbu.png. The breadcrumbs showed the right pathway with Name in the source code. See image: https://pasteboard.co/IzXWDt2.png
We also could not remove a Media Attachment title without WordPress automatically generating a title. Therefore, we would expect that even if you do not have a title for the attachment pages, WordPress would generate one and Yoast would output it as part of the breadcrumb pathway.
If that is not happening we suggest performing a conflict check as it sounds like a plugin or theme conflict. Can you try and gather as much information for us as possible? Please perform the following:
1. Make sure you are using the most recent WordPress Core, v5.2.3. If you are not sure what version you have or how to update, your host provider can help. Also, be sure to update your Yoast to v12.2 and update your non-Yoast plugins.
2. If the issue only happens when Yoast is enabled, please Check for conflicts.
3. Then check the source code and see if the breadcrumb Name item is appearing. This guide explains more about how to check the source code: https://kb.yoast.com/kb/view-page-source-site/.
If there is a conflict with a plugin or a theme, you can create a new GitHub issue for our developers. Please report the issue to a third party developer as well.
If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium and receive our Premium email support and we can help you further.
I have the same problem
Here are some examples from my site:
https://www.emelexista.com/93743-2/3-10/
https://www.emelexista.com/93666-2/3-7/
my template included this tag
<?php echo tagdiv_page_generator::get_breadcrumbs(array(
'template' => 'attachment',
'parent_id' => get_the_ID(),
'attachment_title' => $post->post_title,
)); ?>
which I tried to replace with:
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>
Maybe the solution is to add “Cloud Templates” with “WP Post Modules plugin” for attachments