Breadcrumb trail
-
For those wishing to use a non-plugin based breadcrumb trail, simply insert the following code in your template:
<?php // breadcrumb trail created by Jon Ruttan, based on breadcrumb menu by Chris Poole(chrispoole.com) function breadcrumb() { $url = $_SERVER["REQUEST_URI"]; $urlArray = array_slice(explode("/",$url), 0, -1); // Set $dir to the first value $dir = array_shift($urlArray); echo '<a href="/">Home</a>'; foreach($urlArray as $text) { $dir .= "/$text"; echo ' » <a href="'.$dir.'">' . str_replace("-", " ", $text) . '</a>'; } } breadcrumb(); ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Breadcrumb trail’ is closed to new replies.