Create Breadcrumb in WordPress without a Plugin

Learn to create breadcrumb in WordPress without using any WordPress plugin. Show your homepage, category and post title in breadcrumb easily. In few months of my blogging experience in WordPress, I have learned different important things such as plugin installation, midifying WordPress theme to make it simple, writing a good headlines and how to create social sharing buttons and creating a breadcrumb in WordPress without a plugin. Breadcrumb are beautiful. It don’t have any SEO (search engine optimization) advantage. But, if you want to serve your blog visitors and readers, create a breadcrumb for them. Breadcrumbs are like a “map” or guide.

Create a Breadcrumb in WordPress without a Plugin

What do we need in creating a breadcrumb are the code for home page, code for category and the code for post title or page title. Here I will share to you the codes to be used when making a simple breadcrumb in your WordPress blog. The codes I am sharing are functioning well in my blog.

Steps in Creating a Breadcrumb in WordPress

Follow this step by step guide if you want to show a breadcrumb in your WordPress blog.

Open your single.php page. Decide where you want to show the breadcrumb. You can insert the breadcrumb above the post title H1 or the below the post title. In this blog I show the breadcrumb right after the comment box.

Code for Home Page: <a href=”<?php echo esc_url( home_url() ); ?>”>Home</a>
Code for Category Link: <?php the_category(‘, ‘) ?>
Code for Post Title: <?php the_title(); ?>

So the final code will look like this;

<a href=”<?php echo esc_url( home_url() ); ?>” title=”Return On Investment”>Home</a> → <?php the_category(‘, ‘) ?> → <?php the_title(); ?>

You can change the separator (→) to anything you want. To make the breadcrumb small, just use <small> code here</small>

You can show this to your archives pages and blog page if you want to. Just modify the code and place it to where you want to show the breadcrumb.

Be careful in putting these codes in to your pages. Back up your files before you insert this piece of codes. Now you know how to create a breadcrumb in WordPress blog without using any plugins. Try it let me know if these codes work in your blog.

Exit mobile version