How to add Schema markup to breadcrumbs
How to add Schema markup to breadcrumbs
How to add Schema markup to breadcrumbs
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> >”; $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
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
change: $delimiter=”»”; to: $delimiter=”<span class=”myclass”>»</span>”;
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
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
why breadcrumb has wrong orders?
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
How to Create a Parent of Pages But have it not link yet keep the URL Path?
This not exactly a custom walker, but it has the same result: “Breadcrumbs Trail Navigation”. It can be used as A Plugin Part of your theme If you want to integrate it in your theme, simply put it in your theme, include_once the file and you’re done. On the github link you’ll find a long … Read more