why breadcrumb has wrong orders?

Here is my code:

function the_breadcrumb() {
if (!is_home()) {
    echo '<a href="';        echo get_option('home');        echo '">';
    bloginfo('name');
    echo "</a> / ";
    if (is_category() || is_single()) {
        the_category();
        if (is_single()) {
            echo " / ";
            the_title();
        }
    } elseif (is_page()) {
        echo the_title();
    }
}
}

It gives a wrong result:

Read More
website name > cat1 > cat1 sub1 > cat1 sub2 > cat1 sub3 > your location

The order I try to get:

home >cat1 > cart1 sub1 >your location

Can someone tell me what I have to change?

Related posts