Forum Replies Created

Viewing 15 replies - 76 through 90 (of 2,399 total)
  • Plugin Author John Havlik

    (@mtekk)

    If you want a specific hierarchy, it’s recommended to organize your content within WordPress such that said hierarchy is present (otherwise you’re just creating more work for yourself). Breadcrumb NavXT does not use the URL structure to determine what the breadcrumb trail should be, it uses the relationships between posts, their parents (if present), and the terms (of whatever taxonomy) they are members of. If said relationships are not established, you aren’t going to get the breadcrumb trail you expect.

    For example, if the breadcrumb trail ends up being Home > Citypages and you want it to be Home > Services > Web Design > Citypages, if these are all of the page post type, then Citypages must be a child of Web Design which must be a child of Services (that is Citypages needs to have Web Design set as its parent page, and Web Design needs to have Services set as its parent page). Note that using pages isn’t the only way to make this hierarchy relationship work (there are ways of doing this with Custom Post Types with custom taxonomies as well).

    Under certain circumstances, manually adding breadcrumbs to the breadcrumb trail is necessary (unlikely in this situation, usually necessary for adding support for 3rd party plugins that expand past the normal scope of what WordPress does with post and term/taxonomy relationships), and there are examples of how to do this in the documentation for the bcn_after_fill action.

    Plugin Author John Havlik

    (@mtekk)

    It looks like your product is a member of multiple product category hierarchies. While WordPress supports this, it does not provide a method of determining what category is the most important one/most correct one to show when a post (of any post type) is a member of multiple terms within the same taxonomy. There are ways of influencing the category/term Breadcrumb NavXT uses. You can either write your own hook into the bcn_pick_post_term filter (have the filter return the term you want to use), use Order Bender (an example of how to use the bcn_pick_post_term filter), or Breadcrumb NavXT Paths (especially if you want the user’s path to visiting a post influence the breadcrumb trail displayed).

    Plugin Author John Havlik

    (@mtekk)

    The code probably tries to access something that doesn’t exist. That is, your breadcrumbs array may not have any members, or only a single member (which would result in the -2 in the calculation for the key try to access something that doesn’t exist). You probably should check that there are more than 2 members in the breadcrumbs array before running that bit of code.

    Also note, bcn_after_fill is an action not a filter so the hook registration isn’t correct there (it’ll work but isn’t technically correct).

    Plugin Author John Havlik

    (@mtekk)

    The WPML extensions plugin for Breadcrumb NavXT is a premium plugin available on the Breadcrumb NavXT author’s website. Items such as post titles and terms should translate without the extension. However, root pages, and the breadcrumb templates require the extension plugin to show up in the string translation area in WPML.

    Plugin Author John Havlik

    (@mtekk)

    In the Breadcrumb NavXT settings page, replace %htitle% and %title% in the home template with the text you want to display in the breadcrumb for the home page and press the “Save Changes” button.

    Plugin Author John Havlik

    (@mtekk)

    If you want the home link to always link to the “Member Page” (for every area it’d appear, including in the breadcrumb trail) you’d get get_home_url() to output the link to the “Member Page”. Otherwise, if you want this to be just in the breadcrumb trail, you can use the bcn_breadcrumb_url filter to swap out the URL (either by matching the home URL, or looking for ‘home’ in the type array that is passed into the filter).

    Plugin Author John Havlik

    (@mtekk)

    While I’d content having the first member of the object_type array within the taxonomy object be empty violates the API, I’ve made some changes to check for the existence before trying to use. This was tracked in the following github issue: https://github.com/mtekk/Breadcrumb-NavXT/issues/290

    Plugin Author John Havlik

    (@mtekk)

    On the homepage, you don’t have a breadcrumb trail (which is normal) so I wouldn’t expect to see a BreadcrumbList element there. As for the other pages, how are you calling the breadcrumb trail? The wrapping code isn’t correct (you are using an ol wrapping element with elements that are span not li, unless you really want to use ol and li elements I recommend wrapping the call in a div). The recommended calling code is:

    <div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
    <?php
    if(function_exists('bcn_display'))
    {
    bcn_display();
    }?>
    </div>

    That should cause the breadcrumb trail to show up as a BreadcrumbList item in the rich results test.

    Plugin Author John Havlik

    (@mtekk)

    Breadcrumb NavXT doesn’t by default output the breadcrumb trail twice, my guess is the original call to bcn_display() was still there somewhere. It looks like on the page you linked to earlier that there is just one breadcrumb trail, and that the validator seems to find the BreadcrumbList element, are you still having this issue?

    Plugin Author John Havlik

    (@mtekk)

    How is the site calling the breadcrumb trail? The site in question seems to be using a wrapping div element that is missing the schema vocab and typeof attributes (it looks like it is using an old recommendation for the Breadcrumb NavXT calling code). The recommended calling code is:

    <div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
    <?php
    if(function_exists('bcn_display'))
    {
    bcn_display();
    }?>
    </div>

    That will get the schema.org markup to be recognized. If you are using the widget, you probably should select the “Output Trail as” value of “Schema.org BreadcrumbList (RDFa)”.

    Plugin Author John Havlik

    (@mtekk)

    If you look at what the search console is complaining about, it appears to be on a JSON-LD breadcrumb, which appears to be part of a block that Rank Math is creating (my guess is this is not Breadcrumb NavXT that is causing the issue). If Rank Math is trying to pull in the JSON-LD output of Breadcrumb NavXT, there is likely some extra stuff that needs to be done (see https://github.com/mtekk/Breadcrumb-NavXT-Schema/blob/master/class-schema-breadcrumb-navxt.php). Namely, if you are going to have the item subfield be an array, you must specify a type (specifically "@type":"WebPage"). Of course, this isn’t in the schema.org examples, but both the schema.org validator and the Google validator seem to want this.

    Plugin Author John Havlik

    (@mtekk)

    Without seeing the “more information” part of the google search console error, it’s difficult to diagnose what is going on. Also, seeing the markup Breadcrumb NavXT is generating would help diagnose the issue.

    Plugin Author John Havlik

    (@mtekk)

    There should be a way of accomplishing this using CSS (which is a better way than generating different content for mobile vs desktop). There is a way to target the nth element in a structure, which should allow you to target the second-to-last item in the trail to display (and can modify the text/prepend text to the text). I’ll look at this a little more and see if I can come up with a CSS demo.

    Plugin Author John Havlik

    (@mtekk)

    So the link to the home/main page is retrieved using the WordPress API function get_home_url(). If that isn’t returning the correct URL for the language, then you’ll need extra code to get the correct URL there. This will depend on what you are using for facilitating the multi-language setup on your site. Both WPML and Polylang no longer auto translate get_home_url() so it requires extra code which either you can write yourself or you can use the Breadcrumb NavXT extension plugins for said multi-language plugins.

    Plugin Author John Havlik

    (@mtekk)

    The current version (Breadcrumb NavXT 7.2) works fine with WordPress 6.3, updated the readme to match.

Viewing 15 replies - 76 through 90 (of 2,399 total)