• Resolved gretche

    (@gretche)


    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/or page.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 in header.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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Kush

    (@kushnamdev)

    Hey @gretche

    The breadcrumbs in Neve Lite are not customisable. Once you implement a breadcrumb plugin like Yoast for example, they will be displayed but if you want more control over them you can upgrade to Neve Pro where we have more customization available for the breadcrumbs themselves. You can check our doc for it here

    There might be a way to customize them in Neve lite too by implementing a child theme and use some serious coding skills. You can check out this link , to see how to implement it in a child theme, and this link on how to create a child theme for Neve.

    I hope this will help you get the desired results!

    Thank you and have an amazing day!

    Thread Starter gretche

    (@gretche)

    Thanks @kushnamdev,

    It’s user interface consistency I’m looking for – so breadcrumbs are on all pages (not just wooCommerce ones).

    You say “Once you implement a breadcrumb plugin like Yoast for example, they will be displayed?” – well as you can read in my OP, the Yoast-breadcrumbs are not implemented by e.g. selecting an option, but by addition of code. And their suggestion is to ask the theme provider where best to place this code. That is what I’m asking for.

    You refer to ‘Neve lite’ – is this same as the ‘free’ version?

    Also, I haven’t come across their term ‘non-woo Theme themes'[sic] before. Is Neve ‘woo’ or ‘non-woo’?

    Hi @gretche!

    Non-woo themes are themes that are not compatible with WooCommerce. Neve is fully compatible with WooCommerce, so it is not a non-woo theme. Also, Neve Lite refers to the free version of the theme.

    Regarding the breadcrumbs, as it is stated on the Yoast documentation that you shared, the code can be added in multiple files, depending on where you want to add the breadcrumbs. The easiest way would be to add the code at the end of the page.php file so they will be displayed on every page, but again, it depends on where you want to display them.

    Have a nice day!

    Here is a quick solution. For me it works with the Yoast SEO breadcrumbs. Neve already has the code for Yoast SEO breadcrumbs – only it doesn’t insert it on every page.

    Include this PHP code for every frontend page. You can use the WPCode Lite plugin for example.

    PHP:

    add_filter( 'neve_breadcrumbs_locations', 'filter_breadcrumb_locations', 1 );
    
    function filter_breadcrumb_locations( $content ) {
      return array(
        'neve_after_header_hook'
      );
    }

    CSS:

    header .neve-breadcrumbs-wrapper {
      display: block;
      width: 100%;
      padding-right: 15px;
      padding-left: 15px;
      padding-top: 15px;
      margin: 0 auto 25px;
      max-width: var(--container);
      font-size: .8em;
    }

    The original code in the Neve theme is less than ideal. The original locations cover only some pages – it’s inconsistent. But, as you see, it’s customizable to some extent.

    This code will make Neve insert the breadcrumb into the header, at the bottom of the header, on every page except home.

    The 'neve_breadcrumbs_locations' filter expects a list of existing hooks to be returned to it. It will register the breadcrumbs insertion code at these hooks by itself… so the breadcrumbs block will be inserted automatically at these places. And as every page has a header, the 'neve_after_header_hook' will be called on every page. Except for the home page, which is hard excluded in the code in Neve (in breadcrumbs.php).

    This CSS will make it align identically as the header itself. You can change it to your needs, of course.

    Neve has breadcrumb code integration ready to use for Yoast SEO, SEOPress and Rank Math. No custom breadcrumbs option. These 3 should work.

    I like Neve and I like NavXT, so I’ll look into making work the NavXT breadcrumbs plugin, too.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How add breadcrumbs site-wide’ is closed to new replies.