Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.
function the_breadcrumb() {
global $post;
if (!is_home()) {
    echo "";
        if(is_single()):
        echo 'Main';
        else:
        echo "Home";
        endif;
    echo " / ";
        if ( is_category() || is_single() ) {
            the_category(', ');
            if ( is_single() ) {
                echo " / ";
                the_title();
            }
        } elseif ( is_page() && $post->post_parent ) {
            echo "post_parent)."\">".get_the_title($post->post_parent) . "";
            echo " / ";
            echo the_title();
        } elseif (is_page()) {
            echo '';
            echo the_title();
            echo "";
        }
    }
}

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You should change this line:

echo "post_parent)."\">".get_the_title($post->post_parent) . "";

To something like this:

echo '<a href="'. get_permalink($post->post_parent).'">'. apply_filters('the_title', get_the_title($post->post_parent)) .'</a>';
share|improve this answer
    
Krzysiek Dróżdż Thanks alot :) it's wonderful. –  Adeel Nov 13 '13 at 9:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.