Archived

This topic is now archived and is closed to further replies.

  • 0

Yoast WordPress SEO; Breadcrumbs code


Question

Posted · Report post

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

3 answers to this question

Posted · Report post

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

Posted · Report post

Here is an example from the documentation:

add_action('action_name', 'your_function_name');

function your_function_name() { ?>

    <p>Hello World!</p>

    <?php

}

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)

Share this post


Link to post
Share on other sites