WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to figure out if it is possible to override the output of the Yoast SEO breadcrumb class rather than editing the original file?

Each url segment is wrapped in <span></span> but i'd like to wrap it in <li></li>

Is this possible? Any pointers in the right direction would be appreciated.

Thank you.

share|improve this question
up vote 1 down vote accepted

In cases like this, open the plugin files in a good code editor and search for the elements you need, as there may be an useful hook.

So, for this we have the filter wpseo_breadcrumb_single_link.

Maybe you can replace span for li in $link_output, or use $link to build your own:

add_filter( 'wpseo_breadcrumb_single_link', 'filter_breadcrumb_wpse_88254', 10, 2 );

function filter_breadcrumb_wpse_88254( $link_output, $link )
    // do your stuff
    return $link_output;
share|improve this answer
Thank you, brasofilo that's a great help. – showFocus Feb 25 '13 at 12:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.