Breadcrumbs is a navigation aid used in user interfaces. It gives users a way to keep track of their locations within programs or documents. Breadcrumbs typically appear horizontally across the top of a web page, usually below title bars or headers. They provide links back to each previous page the user navigated through to get to the current page or—in hierarchical site structures—the parent pages of the current one.
You can use Breadcrumbs feature in your WordPress post page or content page to show the hierarchy.
Home » Parent Page » Sub Page1 » Sub Page2
Home » Category » Subcategory » Post Name
Step 1: In your function.php file put the following code for Breadcrumbs.
Step 2: In the header.php or in your theme page put the following code to display the Breadcrumbs.
<?php if (function_exists('wordpress_breadcrumbs')) wordpress_breadcrumbs(); ?>
Step 3: All that remains to do for now, is to design your breadcrumbs with CSS. You can use #crumbs for styling breadcrumbs block and #crumbs .current for styling a current crumb.
Leave a Reply