-
-
Save tinotriste/5387124 to your computer and use it in GitHub Desktop.
<!-- start breadcrumbs --> | |
<?php the_breadcrumb(); ?> | |
<!-- end breadcrumbs --> |
Thank you so much @tinotriste this saved me so much time, easy to implement, well documented and easy to customise! Keep up the good work mate 😄
Time saver ! ! !
Thanks!!! easy of implement to my web.
Thank You!!
Thx you for this code.
Can I use this code in latest version of my WordPress skin published here: https://wordpress.org/themes/browse/new/ and if yes under what licension? :)
Hi
I use this code it's working well, but when I select two categories things going wrong. The title_li=
between two categories.
Wordpress > Testtitle_li=Uncategorized > test post 2
Thank you @muhammadahmed53766. It's working
Wordpress » Test / Uncategorized » test post 2
Thanx you easy to understand, easy to customize : So I replace mine by your one ! ;)
There's some quite big parts missing on this, namely:
- If you have any custom post types then you get 2 separators and no link to the parent page shown
- No support for any kind of parent pages (
get_post_ancestors()
) - No accessibility (aria) labels
- It's using deprecating functions like
get_page()
I've re-written it to fix all of the above problems but it's now quite specific to my project as I've had to hard-code in the parent pages for certain CPT. Happy to share if anyone would find it useful though. I've also set it to return values rather than outputting directly.
For those looking for a more thorough implementation please take a look at how to handle breadcrumbs in WordPress. It includes most of what this gist does, but then also includes various missing features for handling custom post types, parent pages and doesn't use any deprecated functions. Definitely recommend.
@mikemike : Do you have a link to look at your improvements ? thanx ;)
Nice basic and easy to understand breadcrumbs thing which helps me to get into the subject.
Edit: Forked and changed to show static blog link on categories/single posts and to display multiple categories (if applicable.
Thanks for the code even if it does not suit all possible situations. But great as a starter for a newbie like me...
it's really working good..
Very very nice! Thank you.
it's really working good..
only need to update the code 52: $post = get_page($page_for_posts_id); to new function $post = get_post($page_for_posts_id);
Really nice script still works like a charm!
Thanks a lot !!
Thanks :)
For those looking for a more thorough implementation please take a look at how to handle breadcrumbs in WordPress. It includes most of what this gist does, but then also includes various missing features for handling custom post types, parent pages and doesn't use any deprecated functions. Definitely recommend.
Thanks!!