Set a custom breadcrumb in WordPress / Genesis that is different from the post / page title
<p>My company has been developing our own child theme for WordPress / Genesis builds that we use as standard for all of our clients. For SEO we sometimes have longer page titles that don't look good in the breadcrumbs. i.e. "Brick Services In Sometown". It ends up looking like this:</p>

<pre><code>Home / Brick Services In Sometown / Acme Bricks
</code></pre>

<p>What we're wanting to do is be able to have a field on the page / post editor that allows us to enter custom text for the breadcrumb, so it would look like:</p>

<pre><code>Home / Services / Acme Bricks
</code></pre>

<p>I know how to add the appropriate meta boxes to the backend and add the entered info into the post / page meta, but the only way I see to accomplish using this extra data for the breadcrumbs is by editing the Genesis core theme files, which I don't want to do. I would like to accomplish this within the child theme so updating is not a hassle.</p>

<p>If I were to edit the Genesis core breadcrumb.php file I'd do something like:</p>

<pre><code>$ub_breadcrumb = esc_html( get_post_meta( $post-&gt;ID, '_ub_breadcrumb', TRUE ) );
if ( !empty( $ub_breadcrumb )) {

//* Add the custom page title for breadcrumbs if value is set
$crumbs[] = $ub_breadcrumb;
} else {

//* Add the current page title
$crumbs[] = get_the_title( $post-&gt;ID );
}
</code></pre>

<p>This is from the genesis/lib/classes/breadcrumb.php core file on line 363. I'd do something similar for the ancestors of the current page / post in the section above that as well.</p>

<p>Is there another way to accomplish this without editing the core theme files? We're trying to keep this all in the child theme so it's update proof ( as much as can be anyways ).</p>

<p>Thanks. It's an odd thing to Google for, so I haven't found anything besides the built-in breadcrumb filters in Genesis, but those don't cover the post / page title.</p>