Adding Breadcrumbs To My Homepage

Hello,

I’ve used some Schema Code to add breadcrumbs to the home page of my website. Google has acknowledged in it’s “Rich Results” breakdown that the breadcrumbs are on my page and ok, but the navigation menu is not appearing on Google search results or anywhere else.
I also added some code to my Header.php file which looks like this -

    <?php

    if ( function_exists('yoast_breadcrumb') ) {

    yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );

    }

    ?>   

Unfortunately that hasn’t solved my problem. Could I reach out to ask if you could help me?

Here is my website homepage URL

Thank you.
John Morgan

Hi John,

Thank you for contacting us.

I’d not recommend to edit the main theme’s header.php file as any code changes in it will be wiped out when the theme is updated.

Istead, try adding this function with a child theme’s functions.php file.

    add_action('sydney_after_hero', 'sydney_child_add_breadcrumb');
    function sydney_child_add_breadcrumb() {

      if( !function_exists('yoast_breadcrumb') ){
        return;
      }

      if( is_front_page() ) {
        yoast_breadcrumb( '<p id="breadcrumbs">','</p>' );
      }

    }

You can also use the Code Snippets plugin to insert that code without child theme.

Let me know whether the code helps or not.

Regards,
Kharis
aThemes Support

Hello Kharis,

Thank you for you speedy reply, very much appreciated.

I’ve use the “Code Snippets” Plugin since I’m not confident about creating a “Child Theme”.

I can’t see any Navigation bar results so far, but have submitted my Home page and Sitemap to Google Console in case that might eventually resolve the problem.

Regards

John Morgan

Hi John,

Thank you for trying the code.

Which version of Sydney are you running? Is it the latest?

Or perhaps you have an active cache that should be flushed?

Regards,
Kharis
aThemes Support

Hello Kharis,

I’m running the latest version of the Sydney Theme, Version 1.74.

I have flushed my cache on my Wordpress Dashboard and have flushed my Google cache.

However, I still can’t see any navigation menu in Google search results or anywhere else.

Regards

John Morgan