WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Yoast Breadcrumbs] Adding code to templates

[Resolved] [Plugin: Yoast Breadcrumbs] Adding code to templates

  • Hi,
    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?

    Thanks

    http://wordpress.org/extend/plugins/breadcrumbs/

Viewing 7 replies - 1 through 7 (of 7 total)
  • You’ve left out two quite important _’s:

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

    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?

    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!

    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

    seopractices
    Member

    @seopractices

    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

    seopractices
    Member

    @seopractices

    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.

    seopractices
    Member

    @seopractices

    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.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: Yoast Breadcrumbs] Adding code to templates’ is closed to new replies.