How can I add breadcrumb to my Wordpress theme?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bintje
Forum Newbie
Posts: 1
Joined: Sat Apr 11, 2015 1:40 am

How can I add breadcrumb to my Wordpress theme?

Post by bintje »

I bought a wordpress theme from themeforest, it's called Quezal, and I have managed to build the website in the last few months. But now I'm having trouble implementing the breadcrumb. I googled a lot and found out I have to add some PHP code into the header template, but I don't know PHP at all.

Can anyone tell me how to do it right? My website is http://www.skyhallfence.com/

Thank you guys.
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: How can I add breadcrumb to my Wordpress theme?

Post by Celauran »

get_post_ancestors will get you an array of posts, which you can then iterate over to build up the crumb trail.
Post Reply