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

Breadcrumb ordered wrongly

My initial thought is that the issue is here: $category = get_the_category(); If get_the_category() is returning categories in reverse-hierarchical order, then you can do this to put them back in order: $category = get_the_category(); $category = array_reverse( $category ); However, I’m confused by this: But some times facebook is coming 1st then Social Media 2nd… … Read more

problem after update 4.9.6 [closed]

This means that your theme isn’t compatible with the new version of WordPress. Here’s what you can do: You have to update your theme if an update is available. You can go back to the old version of WordPress which I don’t think you should be doing. Try updating your PHP version. Let me know … Read more

How to create a breadcrumb for pages?

There are a lot of plugins that offer a breadcrumb, but you can also create your own. To create a simple breadcrumb, you’ll need 2 functions. One to create a chain of categories, and one to generate the breadcrumb itself. Create a Chain of Categories This function will generate a list of clickable categories, for … Read more