ThemeShaper Forums » Thematic

[closed]

Yoast SEO Plugin (Breadcrumbs)

(11 posts)
  • Started 7 years ago by stever
  • Latest reply from bigdanprice
  • This topic is resolved
  1. stever
    Member

    Hi, Trying out the Wordpress SEO plugin by Yoast. Works fine generally but I cannot get it to add the breadcrumbs when 'clicking the try to add automatically box'. I understand that it is friendly to Thematic, doesn't work for me even in the main thematic theme, or my child theme, is there a tweek I need?

    Posted 7 years ago #
  2. idk if this is still valid as it appears that breadcrumbs have been "incorporated" into the SEO plugin

    http://yoast.com/wordpress/breadcrumbs/

    but if that function is still correct (and it probably is lest it break all old themes using it) then you can add it manually to any thematic hook. thematic_abovecontent or thematic_abovecontainer are probably good options.

    function breadcrumbs(){
    if ( function_exists('yoast_breadcrumb') ) {
    	yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    }
    add_action('thematic_abovecontent','breadcrumbs');

    totally untested. ymmv.

    Posted 7 years ago #
  3. stever
    Member

    Hi Helga, Keeps blowing the ***** out of my functions.php with a white screen of death error.

    Parse error: syntax error, unexpected $end in /blahblah/wp-content/themes/steve/functions.php on line 64

    Line 64 is the ?> last line, moving the function to another part of the functions.php doesn't help. Any ideas..

    Posted 7 years ago #
  4. stever
    Member

    Sorted, looked a little harder.

    /* --- Add Yoast Breadcrumbs --- */
    function breadcrumbs(){
    if ( function_exists('yoast_breadcrumb') ) {
    	yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    }
    }
    add_action('thematic_abovecontent','breadcrumbs');

    Second bracket missing, works fine now, thanks for your help - yet again.

    Posted 7 years ago #
  5. excellent, glad you were able to figure out my error. it was late when i wrote that...

    Posted 7 years ago #
  6. Klaartje
    Member

    What about if you are using a child theme? The automatic add function through the Yoast interface doesn't work so should I add some code to style.css?

    I only want breadcrumbs to appear on the top left of my pages.

    The prior version of Joost's plugin added breadcrumbs successfully and they were in the top but in the middle of the page.

    Thanks for your help!

    K at
    http://usagainstthemachines.com

    Posted 7 years ago #
  7. we're all using child themes here. that is the point of thematic. you also can't add php code to style.css. you'll need to add it to your child's functions.php. give stever's code a try. that's right thing for thematic, but idk if the Yoast code is still accurate.

    Posted 7 years ago #
  8. Sweet, that worked for me as well.

    Posted 7 years ago #
  9. Im trying to exclude it from the homepage, using this code but it doesnt seem to work... Im guessing its a misplaced bracket as I was getting a whitescreen of death until I added a bracket to the end of the code.

    /* --- Add Yoast Breadcrumbs --- */
    function breadcrumbs(){
    if (is_home()) {
    echo '';
    } else {
    if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    }
    }}
    add_action('thematic_abovecontent','breadcrumbs');

    Posted 6 years ago #
  10. middlesister
    Member

    Do you have your blog posts as the home page or a static page? Try changing is_home to is_front_page instead.

    Posted 6 years ago #
  11. Worked like a charm, I had completely forgotten it was a static page.

    Many Thanks.

    Posted 6 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.