• hey,

    im using thesis 1.8 and having trouble with the breadcrumbs. when im on the home page the HOME trail shows up, i want to disable it so i only shows up once a user goes into the categories, pages etc.

    this is the code…….

    function thesis_breadcrumbs() {
    echo ‘<a href=”‘;
    echo get_option(‘home’);
    echo ‘”>’;
    echo ‘Home’;
    echo “”;
    if (is_category() || is_single()) {
    echo ”  »  “;
    the_category(‘ • ‘);
    if (is_single()) {
    echo ”   »   “;
    the_title();
    }
    } elseif (is_page()) {
    echo ”  »  “;
    echo the_title();
    } elseif (is_search()) {
    echo ”  »  Search Results for… “;
    echo ‘”‘;
    echo the_search_query();
    echo ‘
    “‘;
    }
    }
    function display_breadcrumbs() {
    ?><div class=”breadcrumbs”><?php thesis_breadcrumbs(); ?></div><?php
    }

    add_action(‘thesis_hook_after_header’,’display_breadcrumbs’);

    any help is appreciated

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter peter88888

    (@peter88888)

    any one?

    Try this

    function thesis_breadcrumbs() {
    
    if(!is_front_page()){
    echo '<a href="';
    echo get_option('home');
    echo '">';
    echo 'Home';
    echo "  ?  ";
    }
    if (is_category() || is_single()) {
    the_category(' ? ');
    if (is_single()) {
    the_title();
    }
    } elseif (is_page()) {
    echo the_title();
    } elseif (is_search()) {
    echo "Search Results for... ";
    echo '"';
    echo the_search_query();
    echo '"';
    }
    }
    function display_breadcrumbs() {
    ?><div class="breadcrumbs"><?php thesis_breadcrumbs(); ?></div><?php
    }
    
    add_action('thesis_hook_after_header','display_breadcrumbs');
    Thread Starter peter88888

    (@peter88888)

    hey rajesh,

    thanks that worked….however

    can you make it so that it has another one of this “>” rather than one?

    at the moment it looks like this

    home>test1test2…i need it to look like this

    home>test1>test2

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘breadcrumbs- "Home" is showing on homepage’ is closed to new replies.