Hi there,
Try checking out this plugin:
Breadcrumb NavXT
Hi, I tried with that unable to figure out how to configure it for this case… I think this kind of breadcrumb is not supported by this plugin.
A custom function shouldn’t be too hard to build. Use wp_get_post_terms(), then sort the results based on the parent ID. Get more parent terms as needed until you reach the top. From that you can build a breadcrumb, including relevant links, for output to the client.
Hi, I have been search the forum and not able to fine exactly what I am looking for.
$category = get_the_category();
if ($category) {
foreach($category as $category) {
$getcrumbs.= $separator . "<span typeof=\"v:Breadcrumb\">
<a rel=\"v:url\" property=\"v:title\" href=\"".get_category_link($category->term_id)."\" >$category->name</a>"."
</span>";
}
}
echo $getcrumbs;
the above shows the sub category first and the parent category at the last.
I am try to figure out how get parent category first and then sub category.
@shariffrb: You don’t want to have the same variable on both sides of ‘as’ in the foreach structure. Try changing the first 3 instances of $category to $categories. If the categories are coming out reversed from what you want, use $categories = array_reverse( $categories );
before the foreach line.