in ,

Display Breadcrumbs To Your WordPress Website

In this article I show you how to put breadcrumb in your WordPress website by using function the_breadcrumb(), will get the breadcrumbs for the current page this will need to go into the functions.php page.

[php]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();

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

[php]<?php the_breadcrumb(); ?>[/php]

What do you think?

Written by Sopheap

The goal of me is sharing new ideas, inspiration art, fresh and useful resource, covering web design and development, graphic design, advertising, mobile development and life style.


Leave a Reply

Your email address will not be published.

create widge area in wordpress

Create Widget Area For Your WordPress

create custom post type

Create Custom Post Type In WordPress