Where are you expecting the “Home > Page1 > Page2 > Page3 > Page4” trail to show up (on what page)? That trail will only appear on Page4, when it is a child of Page3, with Page3 being a child of Page2, and Page2 being a child of Page1.
I expect to see it on the page displaying search results
or is it not possible?
If i insert in search page this code, see below, i see this result
Page3 > Page4
<div class='breadcrumb'>
<?php // if there is a parent, display the link
$parent_title = get_the_title($post->post_parent);
if ( $parent_title != the_title(' ', ' ', false) )
{echo '<a href=' . get_permalink($post->post_parent) . ' ' . 'title=' . $parent_title . '>' . $parent_title. '</a> » ';}
// then go on to the current page link
?>
<a href='<?php the_permalink() ?>'rel='bookmark' title='<?php the_title(); ?>'><?php the_title(); ?></a>»</div>
Oh, you’re trying to make this work within the loop. That’s not fully supported at the moment. Someone else has run into the same issue and I plan on looking at it in depth for the next release (4.3.0 as 4.2.0 was released for translation almost two weeks ago). A solution will probably exist within two weeks or so in the Git repository (will post here when ready), and will be part of the December/January release.
Thanks for your reply 🙂 I’ll wait for a new release, although it may exist as a “crutch” to resolve this issue now?