Forum Replies Created

Viewing 1 replies (of 1 total)
  • I was search for a way to do this and came across this post. I decided to write my own function to do this:

    <?php
    
    						if (!is_home()) {
    							echo "<ul class='breadcrumb'>";
    							echo '<li><a href="' . get_option('home') . '">' . bloginfo('name') . '</a> <span class="divider">/</span></li>';
    
    							$parents = get_post_ancestors( $post->ID );
    							foreach($parents as $parent){
    								echo '<li><a href="' . get_permalink($parent) . '">' . get_the_title($parent) . '</a>  <span class="divider">/</span></li>';
    							}
    
    							if (is_page()) {
    								echo '<li class="active">' . the_title() . '</li>';
    							}
    							echo "</ul>";
    						}
    
    					?>
Viewing 1 replies (of 1 total)