[Resolved] Breadcrumb NavXT

Home Forums Support [Resolved] Breadcrumb NavXT

Home Forums Support Breadcrumb NavXT

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1191745
    Kévin

    Hi,

    I want to add Breacrumb NavXT to my website but I don’t know how to change the position.

    I see a code to add on the functions.php file on that forum (https://wordpress.org/support/topic/change-position-of-breadcrumb-using-breadcrumb-navxt/) but it’s not really the place i want it to be.

    See on the img here: https://ibb.co/gSvFxx9

    #1191760
    David
    Staff
    Customer Support

    Hi there,

    this visual guide will help – it shows you the various hooks available and their position:

    https://docs.generatepress.com/article/hooks-visual-guide/

    And you can use the Hook Element to add the HTML / PHP that user provides in his original topic:

    https://docs.generatepress.com/article/hooks-element-overview/

    Please ensure you check Execute PHP in the Hook Element.

    #1191794
    Kévin

    Hey,

    I didn’t know it was a hooks visual guide. It will help a lot. Thank you.

    Btw, I did it, but i changed the margin-top of the breadcrumb to be upper. It’s nice on all the page, apart on the home page. I think it’s because the breadcrumb is hidden.

    How can i fix this ?

    Thank’s again.

    Kévin

    #1192003
    David
    Staff
    Customer Support

    In the Hook Element > Display Rules you can Exclude the Front Page

    #1192157
    Kévin

    Hi David,

    I did it (element before_main_content) and exclude Front page, but nothing change.

    This part of generatepress is new for me. I don’t really understand what I have to do.

    Thank’s

    #1192309
    Kévin

    I succeed by doing a “padding-top” on the page, but it’s not the trick that you told me to do.
    Can you explain me better how to exlude the Breadcrumbs Navxt on front page with the hooks.
    I have a child theme and put the code below on the functions.php page.

    add_action( ‘generate_before_main_content’, ‘tu_breadcrumbs’ );
    function tu_breadcrumbs() {
    ?>

    <?php
    }

    Can you tell how did I have to do ?

    #1192386
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    If you want to use that code while excluding the front page, you would do this:

    add_action( 'generate_before_main_content', function() {
        if ( function_exists( 'bcn_display' ) && ! is_front_page() ) {
            bcn_display();
        }
    } );
    #1193159
    Kévin

    Hello Tom,

    Thank’s again. And if I want to use hook. What do I have to put in here ?

    Img here: https://imgur.com/Iu417U2

    After your response, I will close the topic. It’s juste to understand how to use hook and where to place the code.

    #1193379
    Tom
    Lead Developer
    Lead Developer

    If you’re going to use a Hook Element, this would be your content:

    <?php
    if ( function_exists( 'bcn_display' ) ) {
        bcn_display();
    }
    ?>

    Then in Display Rules, you would choose “Entire Site”, and then you would choose “Front Page” in the exclude option.

    #1193556
    Kévin

    Ok, thank’s !

    That’s what i wanted to know.

    Hace a nice week-end !

    Kévin

    #1194038
    Tom
    Lead Developer
    Lead Developer

    Thanks, you too! 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.