John Havlik
Forum Replies Created
-
Forum: Plugins
In reply to: [Breadcrumb NavXT] Problem with special charactersThis is likely indicative of UTF support issues somewhere in your setup. I tested this in a Linux environment with PHP8 and Apache and received the expected word with the umlaut above the a (no C/C++/Java\JavaScript formatted Unicode character code in the HTML). This could be your server, or something silly like the character encoding of the .php file you saved your code in (Windows is known to occasionally do silly things here).
For the linked page, unless you modified the breadcrumb templates, it appears the breadcrumb trail isn’t actually being generated by Breadcrumb NavXT (or the theme has some sort of integration for Breadcrumb NavXT and is modifying things a bit). My guess is the breadcrumb trail being generated is part of the theme, and they are purposely ending with the / since the title is directly underneath the breadcrumb trail. To use Breadcrumb NavXT you’ll need to make sure to call
bcn_display()within the proper .php file in the theme (unless this is a block theme, in which you will need to go into the block template and add the Breadcrumb Trail block provided by Breadcrumb NavXT).Normally, Breadcrumb NavXT doesn’t have a trailing separator. Usually, that only happens if you have something goofy for the last item in the breadcrumb trail (so it ends up being empty, either due to something goofy for the post or the breadcrumb template being empty). If you are trying to remove the current item from the breadcrumb trail, I suggest using one of the solutions provided in the FAQ: https://mtekk.us/code/breadcrumb-navxt/faq/#bcn_ci
If are not trying to remove the current item from the breadcrumb trail, it would be helpful to see the HTML that is being generated by Breadcrumb NavXT to help diagnose the issue.
Forum: Plugins
In reply to: [Breadcrumb NavXT] NavXT Breadcrumbs on single product pages onlyNormally, if you use something like
bcn_display()to call the breadcrumb trail, you would wrap that with anifstatement that checks foris_singular(POST_TYPE)where POST_TYPE for a WooCommerce product. In the last example in the following article, a similar setup to what you want is presented (however it is for specific pages instead of a post type): https://mtekk.us/archives/guides/calling-the-breadcrumb-trail/.Forum: Plugins
In reply to: [Breadcrumb NavXT] How to set text for Blog Breadcrumb?Since the blog breadcrumb is the “Posts Page” set under the WordPress setting Settings > Reading, it uses the title from that Page (and the Page breadcrumb template as it is linking to a Page).
You could look at using the
bcn_after_fillaction to conditionally remove the first breadcrumb from the trail usingarray_shift(). See https://mtekk.us/archives/guides/conditionally-remove-home/ for an example of conditionally removing the home breadcrumb (similar concept but different side of the breadcrumb trail so it usedarray_pop()).Forum: Plugins
In reply to: [Breadcrumb NavXT] Remove breadcrumb link titleYou will have to update all of the breadcrumb templates in the Breadcrumb NavXT settings page (for each of the post types and taxonomies along with a few others for archives of various sorts) to do this.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Undefined array keyI assume if you visit the Breadcrumb NavXT settings page you get warnings that some post types were added too late, is that correct? Normally, this is caused by a post type getting registered way too late (after init level 9000, which is wrong for adding a custom post type, it should never be added that late). However, looking at the code for Responsive Lightbox (which I assume is the one adding this custom post type), it doesn’t appear they are doing anything wrong. I’ll have to actually run this on my testbed to see if I can reproduce the issue.
Forum: Plugins
In reply to: [WP Lynx] Encoding errorDo you have an example URL that is exhibiting this behavior? It appears something on the sites you are tying is breaking the character set detection. That said, letting PHP just do the character detection seems to maybe work better now days (if you have a couple of URLs that are currently causing you issues I can test them against the proposed change).
Forum: Plugins
In reply to: [Breadcrumb NavXT] bcn_display_separator documentationAs mentioned in the documentation, this filter is being introduced in Breadcrumb NavXT 7.2, which has not released yet. This filter was just added to the development branch for the 7.2 release. You will need the https://github.com/mtekk/Breadcrumb-NavXT/tree/triathlete branch to use the filter. Further examples on how to use this filter will be published closer to the release of Breadcrumb NavXT 7.2.
For what you’re tying to do, there is a better way that Breadcrumb NavXT has supported for quite some time. On a multisite setup, there is an network wide settings page for Breadcrumb NavXT, and if you set the the constant
BCN_SETTINGS_FAVOR_NETWORKto true your network settings will take precedent over the individual site settings. Thus, you should be able to set the separator in the network wide settings and have it apply to all of the subsites (see https://mtekk.us/archives/announcements/bcn_settings_favor_-behavior/ and https://mtekk.us/archives/guides/controlling-breadcrumb-navxt-settings-from-the-network-settings-page/).@aleks1155 It’s likely going to be mid to late January 2023 for the 7.2 release.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Is it possible to exclude specific category/taxonomy term.Normally, you shouldn’t have a hidden taxonomy term (generally if you need to do that, you should use a separate taxonomy for that term). That said, you can use the
bcn_after_fillaction to loop through the breadcrumbs and remove the one for the term you don’t want to have appear. If you don’t want to write code to do this, the uManager extension provides two GUI methods of doing this (via the admin bar and via the term editor).Forum: Plugins
In reply to: [Breadcrumb NavXT] How to Turn off Schema of Breadcrumb NavXT?For the individual breadcrumbs, you need to change the breadcrumb templates to remove the schema.org markup. That said, you probably can get away with just not having the
typeof="BreadcrumbList" vocab="https://schema.org/"in your wrapping element (div,span, orolare the most likely options) for the breadcrumb trail. If you’re using the widget, you can change the “Output trail as” to “Plain” from the default “Schema.org BreadcrumbList (microdata)”.Forum: Plugins
In reply to: [Breadcrumb NavXT] Search Console Showing Critical WarningsDouble check your category templates, it appears to have
property="BreadcrumbList"on the wrappingspanwhich is incorrect. It should beproperty="itemListElement". Google’s Rich Results Test isn’t super helpful in pointing out what is wrong, unfortunately, but that looks to be the issue. Also, it appears you have a truncated/incomplete JSON-LD BreadcrumbList in your header which Google’s Rich Results Test doesn’t seem to like either.Forum: Plugins
In reply to: [Breadcrumb NavXT] Icon for home pageNormally, the easiest way of adding an icon to the breadcrumb trail is to add an
imgtag to the home breadcrumb templates. You could also do this with CSS (using CSS sprite concepts).Specifically for font awesome, they recommend using
<i class="fa fa-home" aria-hidden="true"></i>, however, theitag is not allowed in the Breadcrumb templates. So, within your home templates, you want to remove the%htitle%and for the span that contained it, add theclass="fa fa-home"and thearia-hidden="true"attribute to the span opening tag. Note, this will mess up the Schema.org BreadcrumbList markup and will require you to add<meta property="name" content="Home">to the template (or remove all of the schema.org BreadcrumbList portions).