WordPress: Add simple breadcrumb without plugin

Breadcrumbs are used by most big websites. It helps in navigation as well as search engine optimization or SEO. WordPress has a several plug-ins to show breadcrumbs in blogs and websites. How to add a simple breadcrumb to your WordPress website without using a plug-in?

Paste the code snippet to single.php file of your WordPress theme. This will add a simple breadcrumb at the desired location on single post pages. It includes the home URL, the category URL and the title of the post being viewed.

<a href="<?php echo home_url('/'); ?>"><?php echo get_bloginfo('name'); ?></a> / <?php the_category(); ?> / <?php the_title(); ?>

2 Replies to “WordPress: Add simple breadcrumb without plugin”

  1. I’m here to say thank you for your tutorial. This tutorial had help our site build a better breadcrumb. Looking for more tutorial from you.
    Thank you once again.

Comments are closed.