how to add breadcrumb to my website
how to add breadcrumb to wordpress
wordpress
wordpress breadcrum without plugin
wordpress breadcrumb
wp breadcrumb
wp breadcrumb without plugin
Add Breadcrumb to Your Wordpress Website | Step by Step Guide
Orbit Design
6:06 AM
How to add breadcrumb to my wordpress website?
You have a wordpress website and you need to ad breadcrumb to your blog, then you easy add breadcrumb to your website with any plugin.
I will show you the exact way and the best easiest way to ad breadcrumb to your wp website.
So lets start...
Step-1: Just put the code to you wordpress theme functions.php file.
//BreadCrums============================================
function get_breadcrumb() {
echo '<a href="'.home_url().'" rel="nofollow">Home</a>';
if (is_category() || is_single()) {
echo " » ";
the_category(' • ');
if (is_single()) {
echo " » ";
the_title();
}
} elseif (is_page()) {
echo " » ";
echo the_title();
} elseif (is_tag()) {
echo " » ";
echo single_tag_title();
} elseif (is_search()) {
echo " » Search Results for: ";
echo '"<strong>';
echo the_search_query();
echo '</strong>"';
}
}
Step-2: Now call the function where you want to display the breadcrumb url.
<div class="breadcrumb"><?php get_breadcrumb(); ?></div>
Step-3: Add Css your theme css file.
.breadcrumb {
padding: 8px 15px;
margin-bottom: 20px;
list-style: none;
border-radius: 4px;
}
.breadcrumb a {
color: #fe8800;
text-decoration: none;
}
Your done.
If you are facing any problem just leave a comment.
0 Comments