Title: Breadcrumb Hack for 1.01
Last modified: August 18, 2016

---

# Breadcrumb Hack for 1.01

 *  [lennart](https://wordpress.org/support/users/lennart/)
 * (@lennart)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/)
 * Hi,
    I created a [breadcrumb hack](http://lennartgroetzbach.de/get_breadcrumbs.phps)
   for the index.php. You can see it in action @ [my blog](http://blog.lennartgroetzbach.de).
   It works with WP 1.01. ` function get_breadcrumb($showRoot = true, $rootName 
   = "Home") { global $p, $m, $author, $blogfilename, $s, $cat, $siteurl, $blogfilename,
   $tablecategories; echo "<div id=\"breadcrumb\">"; if ($p || $m || $author || 
   $s || $cat) { echo "$rootName > "; if ($p) { echo "_"; the\_title(); echo "_";}
   else if ($m) { echo "Posts of "; if (strlen($m) == 6) { echo "_" . date("F Y",
   strtotime($m."01")) . "_"; } else { echo "_" . date("d.m.Y", strtotime($m)) ."_";}}
   else if ($author) { $user = get_userdata($author); echo "Posts by _$user->user\
   _nickname_"; } else if ($s) { echo "Search Results for _$s_"; } else if ($cat){
   echo "Category _" . get\_the\_category\_by\_ID($cat) . "_"; } } else if ($showRoot){
   echo $rootName; } echo "</div>\n"; }  Post it here in the index.php:  <div id
   ="content"> <?php get_breadcrumb(); ?> <?php if ($posts) { foreach ($posts as
   $post) { start_wp(); ?>  And yes, I will post it to the wiki shortly.

Viewing 15 replies - 1 through 15 (of 23 total)

1 [2](https://wordpress.org/support/topic/breadcrumb-hack-for-101/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/breadcrumb-hack-for-101/page/2/?output_format=md)

 *  [Cena (a11n)](https://wordpress.org/support/users/cena/)
 * (@cena)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33099)
 * Ah, grasshoppah…we have trained you well.
 *  [southerngal](https://wordpress.org/support/users/southerngal/)
 * (@southerngal)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33104)
 * What’s this for? I went to your blog, but unfortunately I only read English. 
   😉
 *  [Nick Momrik](https://wordpress.org/support/users/mtdewvirus/)
 * (@mtdewvirus)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33109)
 * I think it’s for the portion right under the header. It reads HOME and when you
   click on links, it updates according to what pages/posts you are looking at.
 *  [mamabean](https://wordpress.org/support/users/mamabean/)
 * (@mamabean)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33117)
 * Very nice!!!
 *  Thread Starter [lennart](https://wordpress.org/support/users/lennart/)
 * (@lennart)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33120)
 * Yes, it’s the Navigation below the header and I even left it in English (for 
   now at least) 🙂
 *  [anatman](https://wordpress.org/support/users/anatman/)
 * (@anatman)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33125)
 * Hey,
    Nice, thank you! How can i change the separating caracter from “>” to “::”?
   Eduardo
 *  [debwire](https://wordpress.org/support/users/debwire/)
 * (@debwire)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33127)
 * Great idea. I tried to get it to work and got this error though:
    Parse error:
   parse error in /home/debwire/public_html/photoblog/index.php on line 216
 *  [anatman](https://wordpress.org/support/users/anatman/)
 * (@anatman)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33516)
 * Hy Lennart,
    I too got a parse error (on line 3 of my-hacks.php – line one is
   just ‘<?php’, then your code starts – using the updated code). Any idea why? 
   Thanks!
 *  [davidchait](https://wordpress.org/support/users/davidchait/)
 * (@davidchait)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33574)
 * I assume that a path breadcrumb normally stores data via a cookie, setting the‘
   page history’ traversed or some such thing? Wouldn’t think that’d be too hard
   to do… hmmm…
    =d
 *  [alexkingorg](https://wordpress.org/support/users/alexkingorg/)
 * (@alexkingorg)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33765)
 * lennart: I guess we can agree to disagree. I was reading [this discussion](http://www.simplebits.com/archives/2004/02/04/sqxii.html)
   on SimpleBits and thought this quote was pertinent:
 * > Breadcrumb navigation is commonly used as a method for showing the user where
   > they are within the structure of a site — and giving them an easy way of getting
   > back.
 * It is the last part, _and giving them an easy way of getting back_ that this 
   hack is missing.
 *  Thread Starter [lennart](https://wordpress.org/support/users/lennart/)
 * (@lennart)
 * [22 years, 4 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33868)
 * anatman: hmm, so I don’t. If you didn’t fix it yet copy your my-hacks.php to 
   a file called my-hacks.phps and post the url. Then I can see the source.
    alexkingorg:
   then I aree with you (to disagree of course 🙂 ). We both seem have a valid point.
   Let’s carry then on to more relevant discussions… davidchait: no it wouldn’t 
   be too hard. I would strore the information in a session variable, preferrably
   in an array. Maybe someone will just throw it together for you.
 *  [mr_nase](https://wordpress.org/support/users/mr_nase/)
 * (@mr_nase)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33946)
 * nice, i’ll use that.
    dankeschön 😉 grüße aus dtland.
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33968)
 * To piggyback on Alex’s notion of how a breadcrumb _should_ work is like this:
   If I start on the main page, click on a category, then a post, I should get this(
   this is my interpretation of breadcrumbs)… Home > Category > Post Name. If I 
   then click into January, I would expect to see this: Home > Category > Post Name
   > January. Now, depending on how many steps I want to track (5 seems like a good
   number), things can start to fall off the front of the list. There’s no need 
   to track EVERYWHERE I’ve been, but having the last 4 or 5 places I was would 
   be real handy.
    Home > Category > Post Name > January > Jan 20 Category > Post
   Name > January > Jan 20 > Post Name Post Name > January > Jan 20 > Post Name 
   > Home January > Jan 20 > Post Name > Home > Category You get the idea. To me
   that would be a breadcrumb to have…. TG
 *  [Chris J. Davis](https://wordpress.org/support/users/chrisjdavis/)
 * (@chrisjdavis)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33969)
 * lennart: although the link you provided is interesting, a re-definition of what
   a breadcrumb is, is just that: a re-definition.
    Classic breadcrumb technology,
   which has been in effect more or less for around 8-10 years has prior art. A 
   classic breadcrumb is just that, a trail starting with your first location and
   then following you wherever you go on a site, allowing you to then find your 
   way back to where you have been. Fortunately we have things like prior art, which
   means you can’t just decide one day to change what a technology or concept is
   at your whim. Just saying. Chris
 *  [TechGnome](https://wordpress.org/support/users/techgnome/)
 * (@techgnome)
 * [22 years, 3 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/#post-33970)
 * Jesuit. I agree with your definition of a breadcrumb. In fact, the best place
   I’ve seen it implemented in the manner we discussed can be found here: [http://www.qwikiwiki.com](http://www.qwikiwiki.com)…
   far right, the Recently Visited list.
    lennart: I tried to ready every post in
   that thread, but got bored. The problem is that I don’t think most of the posters
   truely understood the intent behind breadcrumbs. Everyone wanted to treat it 
   as a You Are Here (YAH) indicator. Which it isn’t. It’s a “How in the @#$% did
   I get HERE?” TG

Viewing 15 replies - 1 through 15 (of 23 total)

1 [2](https://wordpress.org/support/topic/breadcrumb-hack-for-101/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/breadcrumb-hack-for-101/page/2/?output_format=md)

The topic ‘Breadcrumb Hack for 1.01’ is closed to new replies.

 * 23 replies
 * 16 participants
 * Last reply from: [Mark (podz)](https://wordpress.org/support/users/podz/)
 * Last activity: [21 years, 8 months ago](https://wordpress.org/support/topic/breadcrumb-hack-for-101/page/2/#post-34099)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
