Yoast SEO - Breadcrumbs

In order to use the Yoast breadcrumb functionality, where (and how) do I add the Yoast code in BeaverBuilder?

Regards
Michael

Hello Michael,

I don’t know if this is a Beaver Builder forums question but i like to help, this is how i do it:

Go to the directory of the Beaver Builder child theme and open the file FLChildTheme.php
You can find this file in the folder classes.

Paste the following code inside the helper class final class FLChildTheme {}:

   static public function michael_add_breadcrumbs() {
        if ( function_exists('yoast_breadcrumb')  && !is_front_page() ) {
            yoast_breadcrumb('<div class="container"><p id="breadcrumbs">','</p></div>');
        }
    }

Open the functions.php file in the Beaver Builder child theme folder:
and paste the following code:

// Yoast breadcrumbs
add_action( 'fl_content_open','FLChildTheme::michael_add_breadcrumbs', 1 );

The above example will place the Yoast breadcrumbs in a centered container on all you theme pages, except on the homepage, after the content opens, under the page header.

Hope this helps, kind regards!

Hi Jorrit

Brilliant! This brings the one thing that was missing from a really nice template. At the risk of straining the friendship (last question), how do I reduce the space between the breadcrumbs and the content title? I thought it might have something to do with /p>. Sorry, newbie alert!

regards
Michael

In case I forgot to mention it, thank you very, very much!

Michael

Works beautifully, thanks :slight_smile:

[Content Hidden]