• This is actually not a question, but a hack that might be useful to others.

    I needed to remove the post title from the breadcrumb. Here is how i did it:

    <!-- breadcrumbs: start -->
    <?php if ( function_exists('yoast_breadcrumb') ) {
    	$opt = get_option("wpseo_internallinks");
    	$sep = ( isset($opt['breadcrumbs-sep']) && $opt['breadcrumbs-sep'] != '' ) ? $opt['breadcrumbs-sep'] : '»';
    	$breadcrumbs = yoast_breadcrumb('','',false);
    	$linksArr = split($sep, $breadcrumbs);
    	array_pop($linksArr);
    	echo '<nav id="breadcrumbs">'.implode($sep,$linksArr).'</nav>';
    } ?>
    <!-- breadcrumbs: end -->

    http://wordpress.org/extend/plugins/breadcrumbs/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks pixeline – up against a tight deadline and client asked for the breadcrumbs of a subset of the site to have a different home page:
    thesite.com/jobs/ to actually appear as the ‘home’ crumb in the trail.

    Using your technique, I shifted the relevant bits off the front (used on other parts of the site and hard coded the ‘You are here:’ to the front.

    Does what I’m (the client is!) after so thought it might help someone else:

    <?php if ( function_exists('yoast_breadcrumb') ) {
    	$opt = get_option("wpseo_internallinks");
    	$sep = ( isset($opt['breadcrumbs-sep']) && $opt['breadcrumbs-sep'] != '' ) ? $opt['breadcrumbs-sep'] : '»';
    	$breadcrumbs = yoast_breadcrumb('','',false);
    	$linksArr = split($sep, $breadcrumbs);
    	array_shift($linksArr);
    	array_shift($linksArr);
    	array_shift($linksArr);
    	echo '<div id="breadcrumbs">You are here: '.implode($sep,$linksArr).'</div>';
    } ?>

    Thanks for your tip.
    James

    oh James thats what I need to do too.. im not quite sure what else I need to change to get it to work tho. Im guessing this needs to feature somewhere else? “wpseo_internallinks”

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Yoast Breadcrumbs] How to remove page title from breadcrumb’ is closed to new replies.