Easy Breadcrumb Navi With WordPress

WordPress Themes are very flexible, you can easily make use of PHP. The functions.php of a Theme can easily be modified to add several functions to it.

In a small series of tips and hacks of creating a theme, I will show you how to add a breadcrumb navi in your theme. This kind of navi has established in many websites and is an added value to a user friendly navigation.
Just FYI; every body who doesn’t like to mess around in functions, there are also some Plugins available.

This is how it work’s

The solution without a Plugin, directly in your theme. You have to copy the following function in functions.php; so it will be available in your theme and can be used everywhere. The function will be called in your header.php for example and via CSS formated. I used the class breadcrumb . An example of my dev blog is showing in the picture above.

You can change this function above as you like of course. It is just a simple example and just explain the idea and the function. You can also adjust the structure and output by the help of Conditional Tags. This function is without any modification usable and shouldn’t provide any big problems to implement.

The mix of HTML and PHP can be confusing for some readers, but it was important for me to show the structured outline of this function. That’s why I implement HTML in my example. Of course you can use „echos“ to deliver variables.

In one’s own Account

I wish you fun with experimenting and using this solution; Feedback is also welcome.
But before you have a question, please try to understand the code first. I’m swamped in support emails and can barely answer all of them due to lack of time. I prefer to use my little free time to write about ideas, solutions on this blog. I appreciate your understanding.