Breadcrumb NavXT 5.3.1

This is the first, and hopefully only, bug fix release of the 5.3 branch of Breadcrumb NavXT. Three bugs were mercilessly squashed in this release. These bugs were: a bug that occurred when upgrading settings, a bug that caused a PHP error when the post_type query variable was an array, and an issue with alignment of the settings page content on WordPress 4.4.

In previous versions, a bug in the options migration script prevented new CPTs and custom taxonomies settings, or settings added by extension plugins from being instantiated properly. This manifested itself as undefined index PHP warnings/errors.

In instances where the post_query query variable is an array (set by another plugin), previous versions of Breadcrumb NavXT would throw PHP errors. bcn_breadcrumb_trail::get_type_string_query_var() has been updated to return the default type string when the post_query variable is an array.

Lastly, WordPress 4.4 introduced a slight styling bug in the settings page. In this bug, the content under the settings tabs would be misaligned (fall off to the right edge of the screen). This release introduces a fix to this bug.

As always, you can grab the latest version of Breadcrumb NavXT from the Breadcrumb NavXT page. If you experience any issues with this version of Breadcrumb NavXT, please leave a comment on this post detailing the issue.

-John Havlik

[end of transmission, stay tuned]

17 thoughts on “Breadcrumb NavXT 5.3.1

  1. John,

    I’m trying to figure out how to exclude the string ?post_type=XXX from the URL generated by Breadcrumb NavXT but I feel I’m running in circles. Any hints please?
    See it in action here.

    Alex

      • As it stands now, all breadcrumb links generated on a custom post type page point to the general post type archive page, not the sub-category clicked by the user. If the user removes the “?post_type=xxx” on the URL, they’re taken to the desired place, but we can’t expect the users to do that, can we?

        I see in github you’ve addressed the issue, how can I beta-test the new version please?

        • Hi Alex,

          To use the new feature, you will need to grab the latest from the hurdler branch on GitHub. Then, you will need some extra code running in a site specific plugin, or functions.php. Below is a simple example filter that disables the ?post_type= for all post types:

          add_filter('bcn_add_post_type_arg', 'my_add_post_type_arg_filt', 10, 3);
          function my_add_post_type_arg_filt($add_query_arg, $type, $taxonomy)
          {
          return false;
          }

          You can add this to a site specific plugin, and activate that plugin. Note that the above hasn’t been tested yet (but should work). I’ll get to adding unit tests for the filter sometime this week.

          Please let me know if you run into any issues.

          -John Havlik

          • Hi Alex,

            At this moment, I don’t plan on changing the filter. The only issue may arise is when I write the unit tests if I find a bug. But, I don’t foresee any changes to the filter name and first parameter. So you should not have to change anything once 5.4.0 is released.

            -John Havlik

  2. HEllo,

    I installed Breadcrumb NavXT plugin, Inner pages shows Website Title and Page title as breadcrumb. Instead of that i need the menu path as Breadcrumbs . Please help to sort out this Issue.

    Many Thanks,
    Sandeep Kumar

  3. I am wondering if we can limit the depth of the breadcrumbs to 2. Currently, we have a lot of posts that have multiple parent and grandparent pages that make it confusing in the breadcrumb trail. For instance, we have a large list of projects that are in various categories. Instead of having it show “Home – Projects – Service – Visual Analysis”, we want it to just say “Home – Projects”. Is this possible?

    • Hi Mindy,

      Technically, this is possible, however, there isn’t a combination of settings that will achieve this. Depending on exactly how you want this to behave, you can either write a hook into the bcn_pick_post_term filter to specify the taxonomy term to use for each post (overrides Breadcrumb NavXT’s default decision on the matter). Or, if you want to always keep the breadcrumb trail to under a certain number of breadcrumbs, you can write a hook into the bcn_after_fill action that takes the breadcrumb trail and removes the breadcrumbs you don’t want.

      Now that has been said, you should consider the design and usability implications of what you want to do. From what I can tell, you will end up with a breadcrumb trail that offers little to no utility to the user. Ideally, the breadcrumb trail is a secondary or tertiary form of navigation that contains the full logical path to a resource. Hiding items from the trail violates this principle and should be done with great caution.

      -John Havlik

  4. When my page is DWQA questions list page :[dwqa-list-questions], there while Notic wrong message like this,
    Notice: Undefined index: in ~~wp-content/plugins/breadcrumb/class.bcn_breadcrumb_trail.php on line 788
    Notice: Trying to get property of non-object in ~~/wp-content/plugins/breadcrumb/class.bcn_breadcrumb_trail.php on line 788

    then i was edited the class.bcn_breadcrumb_trail.php in line 783 like else if(is_archive()&&!is_singular() ….

    because is_archive() was return true in [dwqa-list-questions] page.

  5. I am having 2 issues: 1) trouble seeing the > separator, even though it’s defined correctly in the settings (it does not show up in the breadcrumb). I updated my XML to use the BreadcrumbList settings; 2) if I don’t put a hex color value in my CSS, I cannot see the current page (which should not be linked). If I do put in a color value, the current page shows up, kind of as a link (same properties but cannot be clicked). Any ideas? I am working on a dev site, whereas I used the same plugin/code on my existing site w/ no issues. The offending website is http://securityinstallsolutiosn.com/dev and the live/existing is http://securityinstallsolutions.com

    • Susan,

      The default separator for Breadcrumb NavXT is the > separator, looking at the linked site, this is what is being output. However, the body defaults to text being white (#fff). So the solution is to have some CSS for the breadcrumbs that changes the default to black (or some other color). For example, try adding the following to your theme’s style.css: .breadcrumbs{color:#000;}.

      As for the second issue, this seems to be something your theme is doing. Specifically, this block:
      .breadcrumbs span[property="name"]:hover {
      color: #3366cc;
      max-width: none;
      text-decoration: underline;
      }

      Rather than target the span, target the anchor (a tag) for underlining on hover.

      -John Havlik

      • John,

        Thank you! I’ve made some headway. I figured there was something “hiding” the > and you were right on. My last issue is that for some reason the current page is being seen as a link and on hover is being underlined but not clickable. The color is correct (to be the current page) but the hover behavior is extending. Does that make sense?

        • Susan,

          See the second part of my previous reply. The cause is the CSS in your style.css that targets the .breadcrumbs span[property="name"]:hover property. That should be changed to target the anchors, e.g. it should be .breadcrumbs a:hover.

          -John Havlik

Comments are closed.