Okay
  Public Ticket #2411044
Breadcrumbs NavXT not showing on Posts
Closed

Comments

  •  5
    AcuityL started the conversation

    Hello,

    I've activated Breadcrumb NavXT and they're showing just fine in Pages and Woocommerce product pages.

    However they aren't appearing on Posts. Where can I insert the required code to activate it for Posts?

    I can see"bcn_display"function is in the following code:

    laborator_functions.php
    laborator_heading.php


  •  5
    AcuityL replied

    My support request is one week old with no reply. Can please I get a reply and a solution?

  •  1,558
    Laborator replied

    Hi there,

    Can you please share your site credentials here, because we need to login to your site and see this issue live. Your information is safe (private) in this thread.

    To include your credentials click Insert Credentials button in editor toolbar. (See how)

    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group

  •   AcuityL replied privately
  •   AcuityL replied privately
  • [deleted] replied

    Hi AcuityL,

    I have added the following code in functions to force show breadcrumb on posts page and single page:

    /**
     * Show breadcrumb on blog and single post page.
     */
    function _show_breadcrumb_on_blog() {
        return is_single() || is_archive() || is_home();
    }
    add_filter( 'aurum_page_heading_visibility', function( $visibility ) {
        if ( _show_breadcrumb_on_blog() ) {
            return true;
        }
        return $visibility;
    } );
    add_filter( 'acf/load_value', function( $value, $post_id, $field ) {
        if ( 'show_breadcrumb' === $field['name'] ) {
            if ( _show_breadcrumb_on_blog() ) {
                return true;
            }
        }
        return $value;
    }, 10, 3 );
    
    I have tested and it worked:

    medium
    (view large image)

    Please note that the ACF PRO plugin was not active so I have activated and it is now working properly.

  •  5
    AcuityL replied

    Thank you!

  • [deleted] replied

    Happy to hear thatsmile.png

    Have a nice day!