• Resolved GuyB9290

    (@guyb9290)


    Hello,

    I am using the customizr theme and yoast WordPress SEO and Woocommerce SEO plugins.
    In order to display the Yoast breadcrumbs Woo have staed I should use this code:
    ‘// Both woo_breadcrumbs() and Yoast breadcrumbs need to be enabled in the WordPress admin for this to function.
    add_filter( ‘woo_breadcrumbs’, ‘woo_custom_use_yoast_breadcrumbs’ );
    function woo_custom_use_yoast_breadcrumbs ( $breadcrumbs ) {
    if ( function_exists( ‘yoast_breadcrumb’ ) ) {
    $before = ‘<div class=”breadcrumb breadcrumbs woo-breadcrumbs”><div class=”breadcrumb-trail”>’;
    $after = ‘</div></div>’;
    $breadcrumbs = yoast_breadcrumb( $before, $after, false );
    }
    return $breadcrumbs;
    }
    // End woo_custom_use_yoast_breadcrumbs()’

    As Customizr seems to use a derivation of the WordPress and Woo breadcrumbs does anyone know how I alter this code to get the Yoast Breadcrumbs to work please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,
    yep Customizr has its own breadcrumb.
    So .. do you want to replace the Customizr breadcrumb with the yoast one?

    Just add this in your child-theme functions.php:

    if ( function_exists('yoast_breadcrumb') )
      add_action('__before_main_container', 'yoast_breadcrumb', 20);

    (well this assuming you have that breadcrumb activated, otherwise it will generate a php warning)

    to show the yoast’s breadcrumb in the exactly place the Customizr’s one is.

    Then disable Customizr’s breadcrumb:
    https://doc.presscustomizr.com/customizr/content-options/#breadcrumb

    Hope this helps.

    Thread Starter GuyB9290

    (@guyb9290)

    Hello d4z_c0nf,

    Thanks very much for this, very prompt and did the trick.

    Excellent support

    Guy

    Glad you solved Guy, and many thanks for your appreciation ??

    p.s.
    Would you mind marking this topic as resolved?
    Thanks

    Thread Starter GuyB9290

    (@guyb9290)

    Resolved – many thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Yoast Breadcrumbs’ is closed to new replies.