Site logo

Archived topic

Add Breadcumbs below main menu

7 replies · Started by Yann on May 10, 2021

Viewing posts 1–8 of 8

Hi,

I would like to add the breadcumbs Yoast below my main menu (in the <header> of each page / product / and all type of page)
How can I do that by editing child-theme ?
I tried some things but nothing works...
I think it's inside inc > structure > header.php

Thanks

Did you try the method i mentioned ?

Moving it directly below your Menu Items may cause some issues as the Breadcrumbs have links which could interfere when a sub menu is opened over the top of them.

Hi,

Yes i tried it, it works but i need to customise the CSS and I don't know how to do, there is no class on the span tag

If you use this code in your hook:

if ( function_exists('yoast_breadcrumb') ) {
    yoast_breadcrumb( '<div class="grid-container grid-parent"><p id="breadcrumbs">','</p></div>' );
}

Then it will output the content within a grid-container div ( which sets its max width to match the customizer container width) and <p> tag with a unique ID you can target.

It works, thanks a lot !

Awesome - glad to hear that!

This archived topic is closed to new replies.