You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Best but somewhat breaking for current wpseo_breadcrumb_separator filter users :
Apply wpseo_breadcrumb_separator filter AFTER this->separator = ' ' . $this->separator . ' ';
(if a developer is going through the process of using a filter, he would probably be able to add spaces on his own.
2. Easier to implement and reasonable, non-breaking
Use either before or after $this->separator instead of ' ' so wrapping is not random. Do not use before and after
3. Best option aswel but maybe overkill, non-breaking
Add option to choose whether to wrap before or after a separator
4. Best and can be non breaking
Do not add hardcoded spaces at all in the get_separator() method
Let users set the full separator string in the input field. Some users might not want spaces at all.
To make it non breaking, swap current separator value with ' ' + current separator + ' ' in the database when user updates yoast SEO (https://developer.wordpress.org/reference/hooks/upgrader_process_complete/).
Make default value hold spaces aswel
5. Ok and non breaking, can be added/combined with other solutions
Wrap separator in a <span class="separatorClass">' ' + separator + ' '</span>
Although not perfect since it would still hold hardcoded spaces, it could still enable developers to look for a css solution. Separators are currently not targetable at all in any way.
Technical info
irrelevent
Used versions
Yoast SEO version: 24.6
The text was updated successfully, but these errors were encountered:
josevarghese
changed the title
No breadcrumbs wrapping control, poorly implemented wordpress filter
No breadcrumbs wrapping control
Apr 9, 2025
Uh oh!
There was an error while loading. Please reload this page.
Please give us a description of what happened
Wrapping happens randomly before or after breadcrumbs separator. No control
To Reproduce
Step-by-step reproduction instructions
Expected results
Actual results
Screenshots, screen recording, code snippet
Solutions option :
1. Best but somewhat breaking for current wpseo_breadcrumb_separator filter users :
Apply
wpseo_breadcrumb_separator
filter AFTERthis->separator = ' ' . $this->separator . ' ';
(if a developer is going through the process of using a filter, he would probably be able to add spaces on his own.
2. Easier to implement and reasonable, non-breaking
Use
either before or after$this->separator
instead of' '
so wrapping is not random. Do not use
before and after3. Best option aswel but maybe overkill, non-breaking
Add option to choose whether to wrap before or after a separator
4. Best and can be non breaking
Do not add hardcoded spaces at all in the
get_separator()
methodLet users set the full separator string in the input field. Some users might not want spaces at all.
To make it non breaking, swap current separator value with
' ' + current separator + ' '
in the database when user updates yoast SEO (https://developer.wordpress.org/reference/hooks/upgrader_process_complete/).Make default value hold spaces aswel
5. Ok and non breaking, can be added/combined with other solutions

Wrap separator in a
<span class="separatorClass">' ' + separator + ' '</span>
Although not perfect since it would still hold hardcoded spaces, it could still enable developers to look for a css solution. Separators are currently not targetable at all in any way.
Technical info
irrelevent
Used versions
The text was updated successfully, but these errors were encountered: