Forums

[resolved] How to make Breadcrumb NavXT not show up on the homepage (6 posts)

  1. Atticus_Finch12
    Member
    Posted 1 year ago #

    I am running Breadcrumb NavXT on my wordpress site, and everything is looking good. Right now I am just running the basic configuration in the header '<div class="breadcrumbs">
    <?php
    if(function_exists('bcn_display'))
    {
    bcn_display();
    }
    ?>
    </div>'

    I looked in the documentation and maybe I missed it, but does Breadcrumb NavXT make it possible to exclude the breadcrumbs from the homepage.

  2. peteratomic
    Member
    Posted 1 year ago #

    I found the best thing to do was create a separate template without the breadcrumbs as I ended up wanting to turn it off on more than one page.

    Just copy page.php and rename it nobreadcrumbs.php then put this code at the top of the page and remove your breadcrumbs code. Done!

    `<?php
    /*
    Template Name: NoBreadCrumbs
    */
    ?>

  3. mtekk
    Member
    Posted 1 year ago #

    It is super simple, just takes a little knowledge of WordPress conditionals:

    if(function_exists('bcn_display') && !is_front_page())
    {
    bcn_display();
    }
  4. torndownunit
    Member
    Posted 1 year ago #

    mtekk could you tell me where this code is inserted? Thanks.

  5. mtekk
    Member
    Posted 1 year ago #

    You would replace your currently used calling code with the code I posted. The exact location of this code will vary depending on your theme.

  6. torndownunit
    Member
    Posted 1 year ago #

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic