Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.