• Hi There!

    is it possible in Ample do breadcrumbs without any plugin?

    I did something like this:

    (1) Functions.php (in child theme)
    in functions.php I put code:

    //breadcrumb
    function get_breadcrumb() {
        echo '<a href="'.home_url().'" rel="nofollow">Home</a>';
        if (is_category() || is_single()) {
            echo "&nbsp;&nbsp;»&nbsp;&nbsp;";
            the_category(' &bull; ');
                if (is_single()) {
                    echo " &nbsp;&nbsp;»&nbsp;&nbsp; ";
                    the_title();
                }
        } elseif (is_page()) {
            echo "&nbsp;&nbsp;»&nbsp;&nbsp;";
            echo the_title();
        } elseif (is_search()) {
            echo "&nbsp;&nbsp;»&nbsp;&nbsp;Search Results for... ";
            echo '"<em>';
            echo the_search_query();
            echo '</em>"';
        }
    }

    (2) ‘single.php’, ‘page.php’ (*child theme*)
    then I call the get_breadcrumb() function in ‘single.php’ file and in ‘page.php’

    <div class="breadcrumb"><?php get_breadcrumb(); ?></div>

    =>

    (3) styling in style.css (in child theme)

    .breadcrumb {
        padding: 8px 15px;
        margin-bottom: 20px;
        list-style: none;
        background-color: #f5f5f5;
        border-radius: 4px;
    }
    .breadcrumb a {
        color: #428bca;
        text-decoration: none;
    }

    [score] => DOESN’T WORK

    I’ve been trying another simillar ways (does mean: functions.php –> single.php/page.php –> style.css ) but still doesn’t work… but it is possible do in Ample in this way? Does mean without any plugins?

    btw.:
    Interestingly that
    Ample in ‘header.php’ files has something like this:

    
    <?php if( function_exists( 'ample_breadcrumb' ) ) { ample_breadcrumb(); } ?>
    

    but I don’t know what should I do with it code…?

  • The topic ‘How to Add Breadcrumbs without any plugin in Ample Theme’ is closed to new replies.