Support » Plugin: Breadcrumb NavXT » new install, CSS & page hierarchy missing

  • Resolved nikdow

    (@nikdow)


    Sorry, this site is mostly Private so I can’t link to it.
    Just installed breadcrumb-navxt.

    Only the home page and the current page are showing. The intermediate pages in the hierarchy are not being listed.

    I’m talking about post-type = page, and the hierarchy is via the “page attributes” -> “parent” drop-down, where I select the parent page.

    The site has no posts, only pages.

    Viewing the HTML, there is only one <span property=”itemListElement” no matter how many levels down the hierarchy is viewed.

    <div id="single">
            <div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
                <!-- Breadcrumb NavXT 6.4.0 -->
    <span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="Go to CBDWeb documentation." href="https://doc.cbdweb.net" class="home" ><span property="name">CBDWeb documentation</span></a><meta property="position" content="1"></span> > <span class="post post-page current-item">Restore one database from backup</span>        
    </div>
    <h1>Restore one database from backup</h1>   
    

    There should be two pages after “home” and before the current-item.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Havlik

    (@mtekk)

    If you are using pages (instance of the page post type), there should only be one easy way you can end up with a breadcrumb trail for a page containing only the current item and home breadcrumbs, and that is by having the page not have a parent page (e.g. the parent property of the WP_Post object returned by get_post() for the page is empty). Otherwise, for this to happen, one of two settings would have to have been changed using custom code hooking into the bcn_before_fill action (I doubt this is the case).

    The only thing that comes to mind regarding your situation is even though it looks like the parent page is set, it actually isn’t for some reason (e.g. potentially web browser caching is “loading” a stale version of the page). If you have PHPMyAdmin (or some other MySQL admin tool), you could check the wp_posts table to see if your pages have parents set.

    Thread Starter nikdow

    (@nikdow)

    Parent pages are set all the way up. I’ve checked the db as you suggest.

    I ported the site to my local dev environment and ran the PHP debugger over it. All the pages are seen and all parents are set up to the home page.

    I should have mentioned that all pages except for the home page are Private. Perhaps I should have read the documentation, eventually I found bcn_show_post_private and added `add_filter( ‘bcn_show_post_private’, ‘show_private’);
    function show_private(){
    return true;
    }`
    to my theme’s functions.php
    All working beautifully now!

    Thanks for great plugin and special thanks for support.

    Thread Starter nikdow

    (@nikdow)

    Marking as resolved.

    Thread Starter nikdow

    (@nikdow)

    I also found this plugin wp-force-login which makes the whole site private, rather than having to set each individual page as private.

    Plugin Author John Havlik

    (@mtekk)

    Whoops, I forgot about the change in behavior in 6.4 with private posts/pages. Thanks for reporting back what you found. It’s good to hear you found the bcn_show_post_private filter and were able to use it to solve the behavior you were seeing.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘new install, CSS & page hierarchy missing’ is closed to new replies.