Home>Support>North, Hide Breadcrumb NavXT on Hompage

North, Hide Breadcrumb NavXT on Hompage

I’m not having much success with hiding the breadcrumbs on the home page using the example code from BreadcrumbNavXT. I have static pages set, Front page:Home Page and Posts page:Blog

Using the North-Child theme I’ve added this to my header.php file:

But it is still displaying on the home page. Is there something in the North theme that is reseting the example code?

Thanks

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Breathee,

    No, we don’t add anything that should affect that code so it’s odd that its not working for you. Hm. Do you have a public URL where I can take a quick look at your page?

  2. 7 years, 6 months ago breathee

    Hi Alex S, thanks for the reply.

    I’m using WP 4.7.3, (base site pack) North 1.3.3 and Breadcrumb NavXT 5.6.0 and it is a localhost install.

    I’ve activated Breadcrumbs NavXT with then no other changes in theme Settings, visited the homepage and this what I see.

    SO North Breadcrumb NavXT default

    I’ve then added the code to the themes header.php via the WP editor;

    	
    	<div id="content" class="site-content">
    
    		<div class="container">
    
    	<?php if(function_exists('bcn_display') && !is_front_page() &&!is_home()){ ?>
    	    <div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
    	        <?php bcn_display(); ?>
    	    </div>
    	<?php } ?>
    

    but the Breacrumb still shows on the front page. The only way to remove it is to uncheck ‘Place the home breadcrumb in the trail.’ in Breadcrumb NavXT’s settings. Which is not helpful when you visit a subpage where you want ‘ Home => About ‘ to remain. Also with Breadcrumbs NavXT active it leaves/injects some padding below the masthead even if you uncheck ‘Include the margin below the masthead (top area) of your site’. As seen below.

    Breadcrumb NavXT active padding

    However if you disable Breadcrumbs NavXT leaving the code in header.php the padding disappears.

    Now if I enable Yoast SEO breadcrumbs instead I see theme settings appear. However if I replace

    index.php with:

    }?>

    the breadcrumbs still appear on the front page. Again if I remove ‘Home’ from the ‘Anchor text for the homepage:’ setting I’m still left with a gap and no ‘ Home => About ‘ for subpages.

    I just want to hide the breadcrumbs from the front page… As there seems to be no theme settings for Breadcrumb NavXT it would be good to have a check box for Yoast SEO ‘Show breacrumbs on Front Page’ until Breadcrumbs NavXT settings can be added.

    Ben

  3. 7 years, 6 months ago breathee

    My code got cut..

    replace:

    index.php with:

    	<?php if (function_exists('siteorigin_north_breadcrumbs') && !is_front_page()) { ?>
    		<?php siteorigin_north_breadcrumbs(); ?>
    	}?>
    
    • 7 years, 6 months ago breathee

      also forgot to point out that it states North supports Breadcrumb NavXT on the github page. Although it not clear how exactly unlike Yoast SEO. Thanks SO, Ben

      • 7 years, 6 months ago Alex S
        Hi, I Work Here

        Hi Breathee,

        It does. Support implies all of its functionality works without issue and without having to do anything to the theme itself. You’re trying to do something that Breadcrumb NavXT doesn’t support out of the box.

        To clarify, the Yoast settings you’re referring too are added by Yoast.

  4. 7 years, 6 months ago Alex S
    Hi, I Work Here

    Hi Breathee,

    Can you please add the following PHP to your homepage:

    <?php
    var_dump(is_front_page());
    var_dump(is_home());
    ?>
    

    Then please let me know if you see false false or something else (if something else, what?). This will allow me to know if the conditions aren’t actually being met.

  5. 7 years, 6 months ago breathee

    Thanks Alex S, I was expecting to see theme settings for BreadcrumbNavXT like there is for Yoast in North. It seems the ‘hide on front page‘ is a common question when using BreadcrumbsNavXT so the example is external to NavXT’s core.

    Output:

    < ?php var_dump(is_front_page()); var_dump(is_home()); ?>

    Update: I found it, added the condition and it works! Just need to move this to a child theme file.

    In siteorigin-north/inc/template-tags.php line 457 replace:

    if( function_exists('bcn_display')  ) {

    with:

    if( function_exists('bcn_display')  && !is_front_page() ) {

    If this could be added as a on/off settings for the North theme that would be handy!

    Thanks, Ben

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More