Custom Post Type and Breadcrumbs Conflict

I have a custom post type. It seems the breadcrumbs have an extra space for a parent page (which does not exist) inserted. You can see this in the image I attached.

What is happening with theis custom post type that is causing this extra, non-existent parent?

Here is my custom page type:

add_action( ‘init’, ‘register_cpt_result’ );

function register_cpt_result() {

$labels = array(
‘name’ => _x( ‘Case Results’, ‘result’ ),
‘singular_name’ => _x( ‘Result’, ‘result’ ),
‘add_new’ => _x( ‘Add New’, ‘result’ ),
‘add_new_item’ => _x( ‘Add New Result’, ‘result’ ),
‘edit_item’ => _x( ‘Edit Result’, ‘result’ ),
‘new_item’ => _x( ‘New Result’, ‘result’ ),
‘view_item’ => _x( ‘View Result’, ‘result’ ),
‘search_items’ => _x( ‘Search Case Results’, ‘result’ ),
‘not_found’ => _x( ‘No case results found’, ‘result’ ),
‘not_found_in_trash’ => _x( ‘No case results found in Trash’, ‘result’ ),
‘parent_item_colon’ => _x( ‘Parent Result:’, ‘result’ ),
‘menu_name’ => _x( ‘Case Results’, ‘result’ ),

$args = array(
‘labels’ => $labels,
‘hierarchical’ => true,
‘description’ => ‘My firm’s case results’,
‘supports’ => array( ‘title’, ‘editor’, ‘excerpt’ ),
‘public’ => true,
‘show_ui’ => true,
‘show_in_menu’ => true,

‘show_in_nav_menus’ => true,
‘publicly_queryable’ => true,
‘exclude_from_search’ => true,
‘has_archive’ => true,
‘query_var’ => true,
‘can_export’ => true,
‘rewrite’ => true,
‘capability_type’ => ‘post’

register_post_type( ‘result’, $args );

Here is my breadcrumbs function:

function crumbs() {
if ((is_page() && ! is_category()) || is_archive() || is_single() || is_single()) {
$crumbs = ”;
$crumbs .= ”;
$crumbs .= ‘Home’;
$post_ancestors = get_post_ancestors($post);

if ($post_ancestors) {
$post_ancestors = array_reverse($post_ancestors);
foreach ($post_ancestors as $crumb)
$crumbs .= ”.get_the_title($crumb).”;
if (is_category() || is_single()) {
$category = get_the_category();
$crumbs .= ”.$category[0]->cat_name.”;
if (!is_category())
$crumbs .= ”.get_the_title().”;
$crumbs .= ”;
$close_crumb = ”;
$open_crumb = ”;
$separator = ‘→’;
echo str_replace($close_crumb.$open_crumb, $close_crumb.$separator.$open_crumb, $crumbs);

Reslug a Custom Post Type

I built a plugin for wordpress with custom post types and somewhere along the line I realized that I had to rebuild the way slugs are generated. Originally, I had the cpt making default slugs like new-post-1, new-post-2, etc. I realized this was silly and rewrote the naming convention to create a slug from the post title like it should be. The only issue I have now is that I want to have all the old posts I entered into wordpress use the new naming convention. Is there a function or a way to tell wordpress to rebuild/regenerate the slugs for a particular custom post type.

I found this plugin:

But.. it does not work for cpts

Thanks for the help.

Is it possible to load a different sidebar in single.php based on a meta_query filter?

I have a custom post type ‘speakers’ and I have a checkbox custom field (meta_query) to separate my Conference speakers from my Workshop speakers.

I can filter my speakers with this meta_query and things are working fine. But how do I use a different sidebar based on the Conference or Workshop speaker meta_query?

When I click the speakers for their detail (no matter Conference or Workshop speaker) the detail page loads my single-speakers.php and the code to get the sidebar in my single-speakers.php is:

How can I specify a different sidebar, for example get_sidebar(‘workshop’)? Can I write a conditional code to load a different sidebar based on the speakers meta_query? Does this make sense?