Problem retrieving informations and displaying desired structure with custom post type and taxonomy

For question 1, use a custom field when you create the page and use the same template each time. Here is an example using a custom field named house_type. <?php // Template Name: House Type [ … ] $house_type = get_post_meta( get_queried_object_id(), ‘house_type’, true ); $args = array ( ‘post_type’ => ‘house’, ‘orderby’ => ‘meta_value’, … Read more

Adding Separator to Breadcrumbs

I’m not sure if you want it like this, however, this can be achieved by CSS. .crumbs > span > span + span { margin-left: 1em; } .crumbs > span > span + span:before { content: ‘|’; /* or something else */ *display: inline; display: inline-block; margin-left: -1em; width: 1em; text-align: center; } // EDIT … Read more

Custom Post Type and Breadcrumbs Conflict

Your custom post type matches the conditional is_single(), so this part is trying to output the category the post is assigned to, which I’m assuming doesn’t exist: if (is_category() || is_single()) { $category = get_the_category(); $crumbs .= ‘<span typeof=”v:Breadcrumb”><a rel=”v:url” property=”v:title” href=”‘.get_category_link($category[0]->cat_ID).'”>’.$category[0]->cat_name.'</a></span>’; } either check if $category contains a category, or change is_single to just … Read more

WordPress breadcrumb depth

Doing same thing in more concise way: function breadcrump_page( $post ) { $format=”<a href=”https://wordpress.stackexchange.com/questions/140362/%s” title=”https://wordpress.stackexchange.com/questions/140362/%s”>%s</a> &gt;”; $anc = array_map( ‘get_post’, array_reverse( (array) get_post_ancestors( $post ) ) ); $links = array_map( ‘get_permalink’, $anc ); foreach ( $anc as $i => $apost ) { $title = apply_filters( ‘the_title’, $apost->post_title ); printf( $format, $links[$i], esc_attr($title), esc_html($title) ); } … Read more

Breadcrumb not showing custom category post type

I’m still not one hundred percent sure where and what needs to be displayed. If you need to show the current single post’s category, you’ll need to use get_the_category in stead of the_category as the_category needs to be called inside the loop. You can use get_the_category as follow (Remember to use the global $post to … Read more