In WordPress, I am currently using Yoast SEO Plugin to display breadcrumbs for my pages and posts, which works great when visiting a specific page.
Here is the function I use to display breadcrumbs inside my WordPress templates:
<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
For example, when viewing Team Members , which is a child of About Us , I get:
Home > About Us > Team Members
However, I would like to be able to display the same crackers (for individual pages and posts) inside the search results loop.
So far, while searching for Members , the following is displayed:
Your search results:
Team Members Home > Search > Members Members Area Home > Search > Members
But I donβt want breadcrumbs on the Search Results page, I want them to appear on separate pages and messages that appear as a result of a keyword search.
For example, imagine what I was looking for again for Members . I would like to display the following:
Your search results:
Team Members Home > About Us > Team Members Members Area Home > Members Area
I havenβt fussed if it is or is not integrated with the SEO plugin, but so far this is the best solution I have found for displaying breadcrumbs in WordPress!
It also requires an incase expression, here is my search.php file: http://pastebin.com/0qjb2954