How add breadcrumbs site-wide
-
The Neve theme seems to have breadcrumbs on the WooCommerce pages, but not site-wide! [thus not a very consistent UX].
It suggests it’s ‘compatible’ (whatever that means ?? with several plugins incl. YoastSEO.
We already use Yoast SEO – so that is, for us, a good starting point.
An extract from the Yoast guidance is shown below – may I ask for your guidance as to where to best place the code.
And, I guess, to a child copy?
Also, I haven’t come across their term ‘non-woo Theme themes'[sic] before. Is Neve ‘woo’ or ‘non-woo’?An extract from: https://yoast.com/help/implement-wordpress-seo-breadcrumbs/
Copy the following code into your theme where you want the breadcrumbs to be. If you are not sure, you will need to experiment with placement:<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb( '','
' );
}
?>NOTE: Depending on your theme you may or may not need to add in the beginning?<php?and ending??>?PHP tags. If you are not sure, your theme developer can help.
Common places where you could place your breadcrumbs are inside your
single.php
and/orpage.php
file just above the page’s title. Moreover, another option that makes it really easy in some themes is by just pasting the code inheader.php
at the very end.In most non-WooTheme themes, this code snippet?should not?be added to your functions.php file. If you have trouble locating the correct place to add the code, please contact the theme developer for assistance.
— end of extract —Nb I found an earlier thread in this forum on this ~subject, but it didn’t address the same question.
- The topic ‘How add breadcrumbs site-wide’ is closed to new replies.