John Havlik
Forum Replies Created
-
Forum: Plugins
In reply to: [Breadcrumb NavXT] Missing page in breadcrumb trailIt appears the behavior your are expecting is that of a path based breadcrumb trail, where the actual path traveled to reach a page (chain of links visited), is represented in the breadcrumb trail. This could be thought of as a recreation of the browser’s history for the user on your site. Out-of-the-box, Breadcrumb NavXT does not generate path based breadcrumb trails. Instead, Breadcrumb NavXT generates locational breadcrumb trails, which operate under the principle that each resource has a specific location within the resource hierarchy in a website, and this location/hierarchy is what the breadcrumb trail displays.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Remove HomeYour best bet is to use the
bcn_after_fillaction to selectively remove the home breadcrumb from the trail. This article provides an example on how to do this: https://mtekk.us/archives/guides/conditionally-remove-home/ You should just need to change the conditional fromis_page()to the appropriate woocommerce conditional (I assume there is something likeis_woocommerce()or something like that)Forum: Plugins
In reply to: [Breadcrumb NavXT] fix problemAssuming you are setting the
$reverseparameter inbcn_displayto true for an RTL language, it appears the position count is incorrect (still counting LTR). That appears to be a bug, this will be fixed for the next release and I am tracking it in the following GitHub issue: https://github.com/mtekk/Breadcrumb-NavXT/issues/250Forum: Plugins
In reply to: [Breadcrumb NavXT] wrap breadcrumb html output in another tagThere really isn’t a clean way to wrap the entire breadcrumb trail with a custom string/tag via a filter/hook. Since the
bcn_display()functions are primarily intended to be used as a template tag in your theme, wrapper tags are the responsibility of the end developer/integrator to handle in the template. The included Widget and the Gutenberg block include the appropriate wrapper tags as there really isn’t a way to add that yourself with those two usage methods.- This reply was modified 5 years, 4 months ago by John Havlik.
Since you don’t have your WordPress site configured properly (using Blog as a category instead of using the “page for posts”), there isn’t an out-of-box solution for this. You can write some custom code to remove the unwanted breadcrumbs. You could use the
bcn_after_fillaction for this (iterate through the members of the bcn_breadcrumb_trail::breadcrumbs array, check against the id and type). Otherwise, the uManager extension plugin provides an interface for toggling the inclusion of posts (of any post type), and terms (of any taxonomy) from the breadcrumb trail.Forum: Plugins
In reply to: [Breadcrumb NavXT] Breadcrumbs in Attachment adding ?post_type=attachmentTo remove the post type argument from archive URLs, you can use the
bcn_add_post_type_argfilter. This article provides an example of using this filter: https://mtekk.us/archives/guides/how-to-remove-post_type-from-breadcrumb-navxt-urls/That said, the default for attachments probably shouldn’t include the post type argument (or at least should use the parent post’s post type). I’ll look at this for the next release.
Forum: Plugins
In reply to: [Breadcrumb NavXT] WordPress in a subfolder?The easiest option is to change the code adding the static home breadcrumb to use something different than
array('home')(e.g.array('realhome')).Forum: Plugins
In reply to: [Breadcrumb NavXT] Missing field “item”You can either use CSS to hide the
spam property="name"home text, or you could try adding<meta property="name" content="Home">within the anchor.Forum: Plugins
In reply to: [Breadcrumb NavXT] WordPress in a subfolder?Since Breadcrumb NavXT is a WordPress plugin, and only knows about resources generated by WordPress, resources that are not generated by WordPress will need to be added with separate code. This article covers how to add a static breadcrumb to the beginning of a breadcrumb trail: https://mtekk.us/archives/guides/add-a-static-breadcrumb-to-the-breadcrumb-trail/
For whatever reason, Google does not like it when the current item is linked. It’s a long standing bug that they seem to not care about fixing it. Technically, the markup is fully valid (if you copy and paste it into the tool it validates).
Thanks for pointing this out. It appears the .org plugin directory no longer displays code blocks from the readme.txt in the installation section. I’ll update the readme to just point to the basic usage examples. Of course, this change wont appear until the next release (development for this plugin occurs in git and only gets synchronized on new releases).
Forum: Plugins
In reply to: [Breadcrumb NavXT] No structured dataThe default settings for Breadcrumb NavXT, using the recommended calling code, will have fully compliant Schema.org BreadcrumbList markup. However, on the page you linked, it appears you are not using the default breadcrumb templates for Breadcrumb NavXT, nor the requisite calling code. This is not necessarily a problem, if you are using JSON-LD to provide the information (would need to use the
bcn_display_json_ldfunction). Using the RankMath JSON-LD version of the breadcrumb trail may cause there to be discrepancies in the breadcrumb trail for what Google sees and what is rendered on the page.Forum: Plugins
In reply to: [Breadcrumb NavXT] WordPress in a subfolder?Are you using WordPress to generate your home page as well (e.g. the WordPress Address (URL) is different from the Site Address (URL)), or only the entities under /blog?
Forum: Plugins
In reply to: [Breadcrumb NavXT] Breadcrump NavXT update for WordPress 5.6Breadcrumb NavXT works with WordPress 5.6. The message is just due to the readme in the most resent release not including WordPress 5.6 (because it was released before WordPress 5.6). I’ve updated this, so the message will go away shortly. There isn’t any known security risks associated with this.
Forum: Plugins
In reply to: [Breadcrumb NavXT] Missing trailing slash of home urlWell, this is due to how the WordPress
get_home_url()function works (it strips out the trailing slash). Your options are to either make that function return a URL with the trailing/, to use thebcn_breadcrumb_urlfilter to add the trailing/as needed (probably the best and safest option), or to get rid of the non trailing/to the trailing/page.