Display Breadcrumbs On WordPress Post Without Plugin

Breadcrumbs are used to show the process to which you would navigate to a page. For posts on your wordpress blog you can use breadcrumbs on your posts to show the categories which this post is in.

Displaying what categories the post is in means you can add another link to the category so that if the visitor is interested in this category they can easily navigate to more posts on the subject.

The function below the_breadcrumb() will get the breadcrumbs for the current page this will need to go into the functions.php page.

function the_breadcrumb() {
	if (!is_home()) {
		echo '<a href="';
		echo get_option('home');
		echo '">';
		echo "</a>  ";
		if (is_category() || is_single()) {
			if (is_single()) {
				echo "  ";
		} elseif (is_page()) {
			echo the_title();

Now that this function is in the functions.php page you can call this from any page within the post loop.

Go to your single.php page and add the following code anywhere you want to display the breadcrumbs.

<?php the_breadcrumb(); ?>
Back to top ^

Join Paulund

  • Get access to 100s of premium tutorials and downloadable content
  • Members content consists of Premium WordPress plugins, CSS packages, jQuery packages, tutorial demo files and templates for 100s of web development tutorials
  • In-depth development tutorials
  • Priority tutorial requests
  • Priority email development support
  • No ads

Here at Paulund you'll find Web Development tutorials and snippets focusing mainly on PHP, WordPress and CSS. Members will get access to premium tutorials that go into more detail about development with these languages. You will also get access to downloadable premium content based on the tutorial.

Join Paulund

Leave a Reply

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