rankmath / seo-by-rank-math

Rank Math is a revolutionary WordPress SEO Plugin that combines the features of many SEO tools and lets you multiply your traffic in the easiest way possible :bulb: :chart_with_upwards_trend: →
https://rankmath.com
107 stars 52 forks source link

Breadcrumbs - Plural for Post Type Archives #120

Open davidwebca opened 2 years ago

davidwebca commented 2 years ago

Is your feature request related to a problem? Please describe. Currently, the default behavior is that the Post Type Archive link is displayed in the breadcrumbs as singular but, arguably, it should be plural for the Archives and Singular when pointing to a single entity.

Describe the solution you'd like Either add options for every post types so that we can customize the labels, but also maybe filters around line 231 of class-breadcrumbs.php (either on the call_user_func call and refactor it so that its result is filterable, or allow to filter every type of addcrumb* function.

Describe alternatives you've considered I'm currently adding a filter to 'rank_math/frontend/breadcrumb/items' and searching in the array to strip them out to replace them for the plural post type labels.

Additional context 1) Ideal solution: Plural for post type archive as a default as I think it should make sense in most languages. 2) Add more filters in different places in the class-breadcrumbs.php file to allow people to fiddle their way around an alternative name when need be. 3) Add settings in the admin to allow customization - supporting i18n compatibility with popular plugins when possible - for each post type.

Thanks a lot for considering!