Skip to content

Instantly share code, notes, and snippets.

@jmcclellan
Created September 28, 2014 01:18
Show Gist options
  • Save jmcclellan/b2d97ffee0e924e28fa1 to your computer and use it in GitHub Desktop.
Save jmcclellan/b2d97ffee0e924e28fa1 to your computer and use it in GitHub Desktop.
Override Yoast SEO Breadcrumb Trail
@strarsis
Copy link

strarsis commented Jan 7, 2018

You can also specify just an ID for a post, name + url are then generated automatically, e.g.:

$breadcrumb[] = array(
            'id' => 21,
        );

@robin-scott
Copy link

@strarsis this is more elegant. Points for mentioning this here 👍

@MediaMaquina
Copy link

This causes errors on PHP 7.2+
class-breadcrumbs.php:456 ->Warning count(): Parameter must be an array or an object that implements Countable

@JohnCallanan
Copy link

How do I add two links to the trail? For example /about-us/podcasts/postcast-title? I can add one (podcasts), but I'm not sure how to add both /about-us/podcasts/ - any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment