wordpress agency, wordpress agency for development, enterprise wordpress, wordpress website, wordpress developer, make a website, wordpress sites, wordpress blog, wordpress for dummies, wordpress website development, wordpress website design, wordpress design, wordpress web design, wordpress help, wordpress designer, premium wordpress themes, create a wordpress website, wordpress plugin development, wordpress theme development, build a wordpress website, wordpress website templates, wordpress web, woocommerce plugin, wordpress free website, wp themes, setting up a website, wordpress web development, wordpress homepage, wordpress cms, best wordpress sites, custom wordpress theme, wordpress for beginners, best wordpress websites, using wordpress, wordpress designs, create website using wordpress, wordpress web developer, wordpress website hosting, wordpress website examples, create new website, start a website, wordpress premium, wordpress web hosting, create wordpress, wordpress customization, wordpress plugin developer, create wordpress theme, custom wordpress development, wordpress guide, wordpress programming, wordpress design services, create wordpress blog, wordpress website tutorial, using wordpress to build a website, how to build a wordpress website, wordpress website developer, using wordpress to create a website, custom wordpress design, wordpress website designers, building a website from scratch, online site hosted by wordpress, wordpress website development company, hosted wordpress, i want to create a website, best wordpress, build website using wordpress, woocommerce wordpress, website using wordpress, make a wordpress website, setting up a wordpress site, start a wordpress blog, wordpress web design company, wordpress website development services, buy wordpress themes, custom wordpress, create wordpress site, wordpress web design services, wordpress themes for business, wordpress page, world press website, custom wordpress website, steps to create a website, websites created with wordpress, best way to create a website, wordpress web design for dummies, wordpress website design company, learn wordpress step by step, build wordpress site, building a website for dummies, using wordpress for a website, create a website from scratch, wordpress website themes, website design using wordpress, wordpress business website, best way to build a website, design wordpress theme, wordpress site design, wordpress professional, wordpress blog page, wordpress site development, how to create a website with wordpress, top wordpress sites, make a website from scratch, make a webpage, build your own wordpress website, setting up a wordpress blog, get wordpress, wordpress layouts, building a website, wordpress website design tutorial, wordpress free site, website creation, e commerce website, website design, create wordpress account, wordpress web development services, design a website, wordpress cms tutorial, setting up your own website, create your own website wordpress, website developer, website developers, best premium wordpress themes, wordpress free blog, top wordpress websites, create a blog website, build wordpress theme, webdesign, website design companies, best way to make a website, web agency, web developers, custom wordpress plugin development, web page design, wordpress malware, web design companies, ecommerce website design, designer websites, professional website design, wordpress best themes, wordpress create website free, professional website, custom wordpress website design, wordpress blog examples, wp plugin development, examples of wordpress sites, web development companies, web design agency, wordpress webpage, custom website design, mobile website design, best way to learn wordpress, web development agency, popular wordpress blogs, setting up a wordpress website, ecommerce web design, create your own wordpress theme, custom web design, ecommerce website development, wordpress web design theme, build your own wordpress site, website companies, website design agency, website development company, wordpress for business, web application development, best wordpress designers, custom website, web design tools, professional web design, web creation, design companies, web design studio, web development websites, new wordpress, ecommerce design, how to use wordpress to create a website, website design and development, wordpress website management, wordpress start, make a wordpress site, wordpress membership plugin, new wordpress website, web design and development, make wordpress, custom wordpress site, the best wordpress themes, ecommerce web development, wordpress application development, great wordpress sites, wordpress theme designer, new website design, wordpress step by step, web design portfolio, develop website using wordpress, create professional website, best web design, online wordpress, new wordpress site, wordpress tutorials for beginners, best web design company, create wordpress template, start wordpress website, themes wordpress, world press website design, build your website with wordpress, best wordpress blogs, learn to build a website, wordpress tutorial 2022, woocommerce shop, web design prices, premium wp themes, ecommerce website development company

Breadcrumbs Usage for WordPress

Reading Time: 3 minutes

There are multiple ways to navigate your website, and while your website’s main menu acts as the backbone of that system – guiding users to content – it can’t tell your visitors where they currently are within your website.

The breadcrumb menu steps in to fix exactly this. Using breadcrumbs, like literal breadcrumbs from the fairy tale, your users can find their way back to the main page, or any other place within your website as they may please.

So, What Are Breadcrumbs and How Are They Helpful?

Basically, we’re talking of just a hierarchical menu that looks a lot like a Sitemap. This leaves a ‘trail’ of links that can be followed back to the beginning of the navigation that the user has undertaken.

Most of your visitors are not going to land on your homepage, especially if they found their way to via external links or search engines. That’s another benefit to a breadcrumb menu – it helps search engines get your website structure and hierarchy better. This, of course, means better SEO and more
visitors.

Since the breadcrumb menu improves your UX significantly, it also helps reduce bounce rates – so those additional visitors will also stay longer.

Adding Breadcrumbs to WordPress

Like with anything WordPress, the way to add Breadcrumbs diverges in two paths – The easy one, i.e. use a plugin, or the manual way, where you can code breadcrumbs into header.php. Let’s look at both:

  Choosing the best WordPress plugins for your cooking blog

Add Breadcrumbs to WordPress with a Plugin

There’s a bunch of plugins out there, all quite good. We, however, recommend Yoast SEO for the simple reason that it’s common enough that you already have it installed, and it doesn’t count as a new plugin you need to install. Follow these steps to get set up with your new breadcrumbs menu:

Download the plugin

As an SEO-focused plugin, Yoast will offer a lot of customizability – including formatting and styling your breadcrumbs. Download Yoast from the Plugin Directory. Once installed, activate it. So far, so routine.

Insert a function into header.php

Go to ‘Appearance’, select ‘Theme Editor’, find the header.php file and open it. Next, add the below code at whatever position you’d like your breadcrumbs.

It’s advisable, of course, to insert this snippet at the end of the file, though you can feel free to switch it around and see how that affects the end result. You can even insert the code in the theme’s page.php or single.php files instead, depending on what location you favour for the breadcrumb menu.

<?php
if ( function_exists('yoast_breadcrumb') ) {
  yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
}
?>

Enable Breadcrumbs

Within Yoast, locate SEO, then Appearance, and finally Breadcrumbs. Toggle it to ‘Enabled’, and we’re done here.

Add Your Breadcrumbs Manually with a Code

Opt for this if you don’t want to use a plugin or if you don’t have any need for Yoast per se. Read on to get started:

  5 Reasons to Invest in a Custom WordPress Theme

Build A ‘Skeleton’ Function

Coding a PHP function is the manual way of adding breadcrumbs, and we begin this process by making a ‘skeleton function’. Give it a unique name, so as to avoid function conflicts.

<?php
function crumbs_of_bread()
{
/* Insert Breadcrumb menu code here */
}
?>

 

This is the skeleton we talked about, and all the code you add will be between the curly brackets {}.

Insert Ground Rules

Next up, we have to add rules in the function, within the breadcrumb section. The variables in the rules ensure that they can all be changed if you wish to later.

<?php
$show_on_homepage = 0;
$show_current = 1;
$delimiter = '&raquo;';
$home_url = 'Home';
$before_wrap = '<span clas="current">';
$after_wrap = '</span>';
global $post;
$home_url = get_bloginfo( 'url' );

Insert an ‘if else’ statement

Adding this statement below the variables will check if the visitor is on the homepage, and use that to determine whether the breadcrumbs are displayed. This ensures breadcrumbs will always appear when you want them to.

<?php
if ( is_home() || is_front_page() ) {
  /* ustawienie zmiennej/flagi gdy strona to strona główna */
  $on_homepage = 1;
}
if ( 0 === $show_on_homepage && 1 === $on_homepage ) return;
 
$breadcrumbs = '<ol id="crumbs" itemscope itemtype="http://schema.org/BreadcrumbList">';
 
$breadcrumbs .= '<li itemprop="itemListElement" itemtype="http://schema.org/ListItem"><a target="_blank" href="' . $home_url . '">' . $home_url . '</a></li>';
 
$breadcrumbs .= '</ol>';
echo $breadcrumbs;

Insert Function in header.php

Locate the header.php file as before, and append the function to the end of it.

  How to Create an Email Newsletter in WordPress People Will Actually Read?

Save, publish and you can now see your breadcrumbs menu on the webpage.

Looking for WordPress Website Development for your Business?

Our professional developers have proven experience in building high-quality business websites that outperform the competition, thanks to our meticulous attention to detail and the implementation of cutting-edge technologies. We will conduct an in-depth business analysis to ensure the website we create for you meets your highest expectations. Your site will have all of the necessary elements to assist you in increasing your ROI and sales.

Contact Us

The content of this website is copyrighted and protected by Creative Commons 4.0.

Tags:

Vipe Team

Author Vipe Team

Our tireless team who creates high-quality WordPress-related content for you 24/7/365.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

We have already created hundreds of profiting websites!

We have already created hundreds of profiting websites!

Subscribe to our newsletter and get our best WordPress tips!

[mc4wp_form id="8747"]