Jump to content
Sign in to follow this  

Yoast WordPress SEO; Breadcrumbs code

Recommended Posts


Hi all,


I,m trying to enable breadcrumbs from the internal links section of Yoast WordPress SEO. The description on how to do this simply says "Add the following code to your theme’s template(s):" What i can't figure out is in which template file to add it and exactly where in that file i should put the code, 


This is the code;


<?php if ( function_exists('yoast_breadcrumb') ) {

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


If anyone has managed this succesfully please let me know how you did it.


Share this post

Link to post
Share on other sites



Easiest way to achieve this would be to use that code inside a hook. For more information on hooks, see here - http://support.pagelines.me/docs/customization/hooks/


As an alternative, you could try using this - http://www.pagelines.com/store/sections/navxt-breadcrumbs/

Please search our forums, before posting!

Share this post

Link to post
Share on other sites

Hi Danny,


Thanks for the prompt reply. If i can manage i would like to use the breadcrumbs in Yoast WordPress SEO. I'm not comfortable with php and i have never used hooks before. However, reading through the hooks support page it looks simple enough, just create the hook and paste it in the functions php section of my customize plugin, right? Would it be to much to ask for you to create the actual hook using the code above.

Share this post

Link to post
Share on other sites

Here is an example from the documentation:

add_action('action_name', 'your_function_name');

function your_function_name() { ?>

    <p>Hello World!</p>



Where this is:

<p>Hello World!</p>

Add the breadcrumbs code provided by Yoast and replace action_name and both instances of your_function_name to something descriptive so you know what the function is for (e.g. action_name: breadcrumb_links / your_function_name: place_breadcrumb_links)


If this is still too complicated for you, I would recommend this: http://www.pagelines.com/store/sections/navxt-breadcrumbs/ (which requires no code at all)

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Similar Content

    • iExpert
      By iExpert+
      I have been able to find almost all solutions from this forum until this day but now it's over I'm afraid.
      I just can't find a solution, so I really hope anybody can help me.
      I have installed Yoast SEO Plugin and want to implement Breadcrumbs just beneath my navigation bar (Ubermenu).
      The only problem is that I really don't know which php I have to insert it in to and how to make it visible.
      I have this code:
      <?php if ( function_exists('yoast_breadcrumb') ) {yoast_breadcrumb('<p id="breadcrumbs">','</p>');} ?> Furthermore I don't want it to show on the frontpage.
      My webpage: http://iekspert.dk
      Sincerely Dogan
    • Kempston
      By Kempston+
      I can't figure out how to reduce the gap between the breadcrumb section and the header in the Canvas section (see attachment). I'd like to reduce this gap across the site. The page I've used for this example is here: http://kempston.co.za/auto-transport
      The content comes from a normal Wordpress page. If there's a better way of doing what I've done, please feel free to point me in the right direction.
      Many thanks
    • Dominique Wong
      By Dominique Wong
      I am a newbie here and have downloaded Yoast WordPress SEO plugin, which suggested me inserting the following breadcrumb codes for my dms2 theme. 
      <?php if ( function_exists('yoast_breadcrumb') ) {
      yoast_breadcrumb('<p id="breadcrumbs">','</p>');
      } ?>
      Is there anyone could kindly instruct me step-by-step clearly where should I put these codes ?
      Thanks you :) 
    • margie
      By margie
      I like the way the iFooter displays the navigation's breadcrumbs.  But I want just the breadcrumbs without the various navigation columns beneath it.  Is there a way to do this?
      Thanks so much and have a wonderful weekend!
    • dchetson
      By dchetson+
      There is a significant amount of padding in the breadcrumbs box of my site (www.chetson.com). I cannot figure out how to reduce the padding to just the height of the actual text. Any help would be greatly appreciated.