[resolved] [Plugin: Yoast Breadcrumbs] Adding code to templates (8 posts)

  1. zilther
    Posted 7 years ago #

    I know very very little about php.

    After adding the code below, my site didn't function at all.
    <?php if ( functionexists('yoastbreadcrumb') { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } )?>

    Could anyone explain in better detail how to do this properly?



  2. Joost de Valk
    Posted 7 years ago #

    You've left out two quite important _'s:

    <?php if ( function_exists('yoast_breadcrumb') { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } )?>

  3. zilther
    Posted 7 years ago #

    Thanks joostdevalk,
    BTW, I copied that code from the installation page:

    Can I drop this php code anywhere in my templates or is there a specific place to insert?

  4. Joost de Valk
    Posted 7 years ago #

    Hmm thanks Zilther, I'll remove that page and point people to the instructions on my site. Could you set the topic to resolved after that? :) Thanks!

  5. zilther
    Posted 7 years ago #

    Topic is resolved, thanks for the quick replies. For any other total WordPress noobs questioning how to add the code to your templates see below:

    From the dashboard-
    click on "Design"
    Then click "Theme Editor"

    Add the code from the installation instructions to any of your post and/or page templates where you would want the breadcrumbs to show up.

    When inserting the code I placed it on an open line, spaced one line apart from other code in a spot that followed a </div>

    This worked out well on my site Raproto.com

  6. seopractices
    Posted 7 years ago #

    What templates are most recommended to use the code at, and exactly where within the code? Sorry I'm a total noob to php. Thanks

  7. seopractices
    Posted 7 years ago #

    Sorry I'm a total noob. Joost posted:
    Add the following code to your theme's template(s):
    <?php if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    } ?>

    What templates? I was reading that wordpress has the following templates:
    * Header - header.php
    * Sidebar/Menu - sidebar.php
    * Content - index.php, single.php, page.php, category.php, author.php, search.php, etc.
    * Footer - footer.php

    Also, where exactly within the template's code? Anywhere?

    Thanks in advance.

  8. seopractices
    Posted 7 years ago #

    I have another question. Is it possible to change the styles of the plugin so letters will display bigger, place a background for the breadcrumbs or make links show in another color just like Joost has in his blog? If so, where? Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic