Custom Breadcrumbs Without Plugin in WordPress
Custom breadcrumbs refer to an efficient website navigational tool. It meant to help trace one step back to the website home.
Breadcrumbs are actually more important to your WordPress Website than you might think.
Here Example :
function get_breadcrumb() { ?>
<div class="breadcrumb_info">
<div class="container">
<?php echo '<ul><li><a href="'.home_url().'">Home</a></li>';
echo '<li>';
if( is_category() || is_single() ) {
the_category(' • ');
if( is_single() ) {
echo the_title();
}
} elseif(is_page()) {
echo the_title();
} elseif(is_search()) {
the_search_query();
}
echo '</li></ul>'; ?>
</div>
</div>
<?php }