Remove Sponsored String in Breadcrumbs


I copied the below snippet on how to “add sponsored post prefix to post tile” from:

add_filter( ‘the_title’, ‘wpb_sponsored’ );
function wpb_sponsored( $title ) {
global $post;
$sponsored_text = ‘ Sponsored Post ‘;
$sponsored = get_post_meta($post->ID, ‘sponsored’, true);
if( $sponsored == ‘true’ && in_the_loop() ){
return $sponsored_text.$title;
return $title;

This above snippet is working, however, I am having this issue of the “Sponsored” string showing in the breadcrumbs. Can anyone assist with a solution not to show the “Sponsored” string in the breadcrumbs but only on the Post Title?

One of the URL’s I am referring to is this:

Your help will be appreciated.


, , LM20 4 years 2020-05-21T13:10:25-05:00 0 Answers 91 views 0

Leave an answer