Jump to content


Photo
- - - - -

Yoast WordPress SEO; Breadcrumbs code

breadcrumbs

  • Please log in to reply
3 replies to this topic

#1 teddy777

teddy777

    Newbie

  • Members
  • 2 posts
  • Framework Version:PageLines Framework - Professional
  • Country: Country Flag

Posted 22 March 2013 - 12:39 PM

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.

 



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 15249 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 22 March 2013 - 12:45 PM

Hi,

 

Easiest way to achieve this would be to use that code inside a hook. For more information on hooks, see here - 

Please Login or Register to see this Hidden Content

 

As an alternative, you could try using this - 

Please Login or Register to see this Hidden Content



#3 teddy777

teddy777

    Newbie

  • Members
  • 2 posts
  • Framework Version:PageLines Framework - Professional
  • Country: Country Flag

Posted 22 March 2013 - 02:22 PM

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.



#4 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 22 March 2013 - 03:01 PM

Here is an example from the documentation:

Please Login or Register to see this Hidden Content

Where this is:

Please Login or Register to see this Hidden Content

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:

Please Login or Register to see this Hidden Content

(which requires no code at all)







Also tagged with one or more of these keywords: breadcrumbs