Forum Replies Created

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

    (@mtekk)

    So, the PHP code I posted would go in your theme, or child theme, wherever the call to bcn_display() is located.

    Regardless, based on what the breadcrumb trail is currently generating, the structured data testing tool seems to be happy with the markup. However, it looks like your Home Template is wrong. You should use something like:

    `<span property=”itemListElement” typeof=”ListItem”><span property=”name”>Home</span><meta property=”position” content=”%position%”></span>

    At least, that is based off of one page I checked. For some reason the blog section seems to be using completely different settings.

    • This reply was modified 5 years, 2 months ago by John Havlik.
    Plugin Author John Havlik

    (@mtekk)

    Breadcrumb NavXT does not include a shortcode and makes no claims as to providing one. Unless your theme supports Breadcrumb NavXT (so that simply activating Breadcrumb NavXT causes a breadcrumb trail to appear), you need to call the breadcrumb trail using one of the provided methods: the widget, the Gutenberg bloc, or bcn_display().

    Breadcrumb NavXT includes a widget and a Guternberg Block that can be used to add a breadcrumb trail to your WordPress site without writing any code. The installation section of the .org plugin repo for Breadcrumb NavXT points to an article on how to call the breadcrumb trail using the bcn_display function (the normal way).

    • This reply was modified 5 years, 2 months ago by John Havlik. Reason: formatting
    Plugin Author John Havlik

    (@mtekk)

    See the following article on BuddyPress compatibility: https://mtekk.us/archives/wordpress/plugins-wordpress/breadcrumb-navxt-and-buddypress-compatibility/

    The gist is you need a helper/extension plugin for BuddyPress specific resources. See: https://github.com/mtekk/Breadcrumb-NavXT-BuddyPress-Extensions

    Plugin Author John Havlik

    (@mtekk)

    So, from what I see right now on the linked page, there is the wrapper for the breadcrumb trail, but there are no breadcrumbs in the trail. This is likely to cause problems with the search console. If you want the breadcrumb to be there, make sure the Home Template (unlinked) is set to:

    <span property="itemListElement" typeof="ListItem">
        <span property="name">Home</span>
        <meta property="url" content="%link%">
        <meta property="position" content="%position%">
    </span>

    If you don’t want the breadcrumb trail on the home page, you should use something like the following as your calling code:

    <?php if(function_exists('bcn_display') && !is_front_page()): ?>
    <div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
    <?php bcn_display(); ?>
    </div>
    <?php endif;?>
    Plugin Author John Havlik

    (@mtekk)

    For clarification, are the links that lead to 404s in the breadcrumb trail from Breadcrumb NavXT, or are these links from elsewhere on the site? Breadcrumb NavXT uses the standard WordPress API to get the links used in the breadcrumbs in the breadcrumb trail. If the links are leading to 404s, then for some reason the WordPress API is generating an invalid link. As to the installation/activation of Breadcrumb NavXT impacting this, I don’t know of anything in the plugin that would or could do that.

    Additionally, given the described behavior of this being a problem that seems to “build with time”, it sounds like there may be a caching issue of some sorts on the site that is the ultimate cause of this behavior. I suspect that the installation of Breadcrumb NavXT and the appearance of this behavior is more of a coincidental relationship rather than causal relationship. As to how this is actually happening, I’m slightly at a loss. I guess I’d start by looking at the server logs to see if something interesting is appearing there. After that, I’d focus on any code that is dealing with permalink registration/query argument manipulation.

    Plugin Author John Havlik

    (@mtekk)

    The breadcrumb trail on the linked page is not being generated by Breadcrumb NavXT. So this is probably something your theme is doing to/for you.

    Plugin Author John Havlik

    (@mtekk)

    Try the following:

    1. Change the England category title back to England
    2. Go to the edit screen for the Britain 9: Haydon Bridge to Holy Island post
    3. In the side bar, uncheck all categories other than England
    4. Save/update the post
    5. Visit the page

    When you do that, does England show up in the breadcrumb trail?

    It is very unlikely that this would be a widget, or even category name thing. It is almost certainly a post being an explicit member of multiple categories in the same hierarchy.

    If the name seems to affect whether or not the category shows up, that means the order the term is returned by get_the_terms matters. Which if that’s the case, the behavior of Breadcrumb NavXT needs to be taken into account. When a post is an explicit member of multiple terms within the same taxonomy, Breadcrumb NavXT will use the first term returned by get_the_terms that has a parent term. So, if you affect the order how the terms are returned by get_the_terms (e.g. by changing the name) you can affect what Breadcrumb NavXT uses in the breadcrumb trail. This behavior, in the past, was used by the Order Bender plugin to set a preferred term (however, there now exists a filter that is more reliable and only affects Breadcrumb NavXT). The best solution is to only have posts be an explicit member of a single category.

    Plugin Author John Havlik

    (@mtekk)

    If you’re getting an error on the settings page, you’re going to have to check your ModSecurity logs and see what rule is getting triggered. Generally, ModSecurity requires special rules for the WordPress admin area to prevent inadvertent triggering. You may have to work with your webhost to clear up the ModSecurity issue.

    Plugin Author John Havlik

    (@mtekk)

    This is likely due to the organization of the content (e.g. pages having parent pages) does not match the menu. Breadcrumb NavXT by default uses the actual content organization within the WordPress site to generate the breadcrumb trail. The WordPress Menu does not actually reflect the actual organization of resources within a WordPress site. That said, there are ways to make Breadcrumb NavXT follow the WordPress menu (Menu Magic allows you to tell Breadcrumb NavXT what menu you want it to use for generating the breadcrumb trail).

    As for #2, to change the title of the Home breadcrumb, replace %htitle% and%title%with "Home" in the "Home Template" and "Home Template (unlinked)" under the General tab in the Breadcrumb NavXT settings page. As for doing this on each breadcrumb, there are ways of doing this (using thebcn_breadcrumb_title` filter, or a premium plugin such as Title Trixx (provides a metabox to have a custom breadcrumb title) or Menu Magic (uses the title of the resource that the WordPress menu uses)). However, if you need to manually changing the title that is used in the breadcrumb trail for multiple pages, you’re probably doing something wrong with your page titles.

    Plugin Author John Havlik

    (@mtekk)

    By chance are you making the post an explicit member of multiple categories within the same category hierarchy (e.g. of England and LEJOG 2013)? If so, that’s likely the problem. It is a best practice to only set a post to be the explicit member of the deepest category (or term) in a hierarchy, it will automatically be an implicit member of all of the parent categories of said category (WordPress automatically handles the implicit membership of parent categories/terms, and is one of the main features of having a hierarchical taxonomy).

    Plugin Author John Havlik

    (@mtekk)

    So, this isn’t something that you’re going to be able to do without writing some extra code to use some filters. And honestly, it’s going to get a bit messy. You will need to use the bcn_breadcrumb_title to add the extra “custom word” to the subcategory A breadcrumb title (or potentially bcn_breadcrumb_template if you want the custom word outside of the linked portion of the breadcrumb). To get the category hierarchy you want, you’re going to have to find a way to get subcategory W to be the child category of subcategory A, that is the parent property of subcategory W will need to be the term_id of subcategory A (how this is done is up to you).

    Plugin Author John Havlik

    (@mtekk)

    Yes, Breadcrumb NavXT works with WordPress 5.7

    Plugin Author John Havlik

    (@mtekk)

    Breadcrumb NavXT generated location based breadcrumb trails, what you are describing sounds like path based breadcrumb trails. That is, path based breadcrumb trails show the path a user took to reach a resource. These types of trails are problematic and are not natively supported by Breadcrumb NavXT (have to track a user to generate them properly, which now requires consent in many jurisdictions, additionally it duplicates the function of the back button in the browser). There are ways to generate quasi path based breadcrumb trails with Breadcrumb NavXT, but that is mostly for picking a taxonomy term or taxonomy when there are multiple options.

    Plugin Author John Havlik

    (@mtekk)

    I guess the solution depends on exactly what you want to do.

    If you want to remove the breadcrumb for that category from the breadcrumb trail, you can use the bcn_after_fill action to traverse the breadcrumb trail, looking for the breadcrumb for the category in question, and removing it from the array. An example of how to use the bcn_after_fill action to perform a similar action is presented in the following article: https://mtekk.us/archives/guides/conditionally-remove-home/

    If you want to just remove the link on the breadcrumb, but keep it in the trail, you can use the bcn_breadcrumb_linked filter. An example of how to do this is presented in the following article: https://mtekk.us/archives/guides/remove-the-link-in-a-breadcrumb/

    If you want the breadcrumb to link to the category page rather than the category archive, follow what I suggested in this thread: https://wordpress.org/support/topic/link-problem-in-breadcrumbs/

    Plugin Author John Havlik

    (@mtekk)

    That string is part of the “Search Template” setting in the Breadcrumb NavXT settings page, found under the Miscellaneous tab. What likely happened is a setting has been changed/saved and that occurred before the translations existed (it looks like that string isn’t translated in the .org translation tool: https://translate.wordpress.org/projects/wp-plugins/breadcrumb-navxt/stable/fr/default/?filters%5Boriginal_id%5D=580751 ).

    So, your best bet now is to update the “Search Template” setting to be what you want it to be (translate/replace the English “Search results for” string), and then press the “Save Changes” button at the bottom of the screen.

Viewing 15 replies - 346 through 360 (of 2,399 total)