Forum Replies Created

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

    (@mtekk)

    Reviewing the behavior in WPML on my testbed, it appears things work correctly (though I only tested the Post post type, others should work as well). Switching to a different language doesn’t cause the term hierarchy to get jumped. I’m going to need a little more information on your setup to try to recreate it on my testbed. It would be helpful to know if when you only include the deepest term, is just the breadcrumb for the product archive page missing, or are some category breadcrumbs missing as well?

    Plugin Author John Havlik

    (@mtekk)

    When you only include the deepest term, is just the breadcrumb for the product archive page missing, or are some category breadcrumbs missing as well. This should not be happening. I’ll double check on my WPML testbed to see if I can recreate the issue (may take a few days for me to get to it).

    Why your current method may work in English and not in other langues has to do with the order that WordPress returns the categories in. This can appear to be somewhat arbitrary, and Breadcrumb NavXT will pick the first term with a parent (if the taxonomy is a hierarchical taxonomy). On the other languages, the returned term is likely before the deepest term in the hierarchy (but still has a parent term). This behavior can be overridden with the bcn_pick_post_term filter (https://github.com/mtekk/Order-Bender provides a GUI that does this, not sure how well it plays with WPML).

    Plugin Author John Havlik

    (@mtekk)

    Breadcrumb NavXT would not add the custom taxonomy itself. You can either use a plugin that provides a GUI for creating custom taxonomies, or checkout the WordPress Documentation on how to use the register_taxonomy function to add a custom taxonomy to your post type.

    Plugin Author John Havlik

    (@mtekk)

    For hierarchical taxonomies (e.g. categories), only make the post an explicit member of the deepest child term (category). Since WordPress will make the post an implicit member of the parent terms (categories), there isn’t a need to make a post an explicit member of each term in a hierarchy. Breadcrumb NavXT expects posts to be a member of only one term in a hierarchical taxonomy and its term selection behavior is optimized for that. Hence, if the post is a member of multiple terms in the same hierarchy, the full hierarchy depth may not be represented in the breadcrumb trail.

    Plugin Author John Havlik

    (@mtekk)

    As discussed in another thread: https://wordpress.org/support/topic/breadcrumblist-errors-on-the-last-item-because-it-is-missing-the-item-tag/#post-10638393 the unlinked breadcrumbs should not contain structured data (otherwise Google’s tool will throw errors which is expected per the schema.org spec). The latest version of Breadcrumb NavXT should be using a more basic <span class="%type%">%htitle%</span> by default rather than something with schema.org markup.

    Plugin Author John Havlik

    (@mtekk)

    Have you considered using a different taxonomy (even a custom taxonomy) for your child categories/metadata? Doing so would keep them out of the breadcrumb trail, and will likely result in better logical organization of your site.

    Plugin Author John Havlik

    (@mtekk)

    For the home page, Breadcrumb NavXT already uses get_home_url() to get the home URL. If the multilingual plugin is not translating the URL provided by that WordPress function, that’s on the multilingual plugin. Polylang apparently doesn’t handle translating get_home_url()‘s output (the Polylang specific extension plugin for Breadcrumb NavXT has to deal with the home URL). WPML does translate get_home_url()‘s output.

    In general, root pages that are set within the Breadcrumb NavXT settings page are not going to get automatically translated without an extension plugin (the multilingual plugins have no way of knowing what to do here as WordPress doesn’t have a concept of root pages for CPTs).

    Plugin Author John Havlik

    (@mtekk)

    Normally, this isn’t something you’d do. Can you elaborate on why you do not want the child category in the breadcrumb trail? Knowing the core problem that you are tying to solve will help me provide a solution.

    Plugin Author John Havlik

    (@mtekk)

    This is the expected behavior of Breadcrumb NavXT. Primary terms in a taxonomy are not a construct that is present within WordPress code, so this isn’t something the core of Breadcrumb NavXT will pick up on without additional code. An older method of dealing with this was to change the order that the terms are returned to take advantage of how Breadcrumb NavXT selects a term. More recently, the bcn_pick_post_term filter was introduced and can be used to tell Breadcrumb NavXT what term to use within a taxonomy.

    Order Bender (see https://github.com/mtekk/Order-Bender/blob/master/order-bender.php) provides an interface for setting the primary term, re-orders the term output (to place the primary first), and uses the bcn_pick_post_term filter. You should be able to modify Order Bender to integrate with whatever solution you’re using to set a primary term (likely just need to change what post meta is used in the function hooking into bcn_pick_post_term).

    Plugin Author John Havlik

    (@mtekk)

    To assist you, I need more information regarding the issue you are experiencing. Can you provide more detail as to how this is breaking your sidebar? What do you mean that it was good until today? Was it installed previously on your site and did something just recently break? If so, what changed?

    Lastly, in the future consider opening a support topic in the forums (https://wordpress.org/support/plugin/breadcrumb-navxt/ for Breadcrumb NavXT) before writing a review asking for help.

    Plugin Author John Havlik

    (@mtekk)

    My philosophy is to not include 3rd party specific plugin code in the core Breadcrumb NavXT plugin. In general, most things are automatically translatable. Beyond what is possible using the WordPress API/concepts in core is the ground for extension plugins. There are premium extension plugins to Breadcrumb NavXT that fill in support for a few concepts that Polylang and WPML don’t automatically pick up on (translating root pages, translating breadcrumb templates).

    Plugin Author John Havlik

    (@mtekk)

    It looks like both linked author pages do not have fully working breadcrumb trails (both have the author’s name missing from the breadcrumb trail). I assume this is due to get_the_author_meta returning an empty string. As to how to fix this, I guess a filter could be written for the get_the_author_{$field} filter where {$field} is the value of the “Author Name” setting in the Breadcrumb NavXT settings page that would return the expected value using some code specific for Co-Author plus.

    Plugin Author John Havlik

    (@mtekk)

    is_front_page is a function, you need the parentheses after it, e.g. your first line should be:

    <?php if(function_exists('bcn_display') && !is_front_page()):?>

    Plugin Author John Havlik

    (@mtekk)

    Yes, the provided code was straight out of the article, you will probably want to modify it as you see fit (especially the if condition).

    Plugin Author John Havlik

    (@mtekk)

    @alriksson In the article I linked to, the last code example moves the if statement outside of the div block:

    <?php if(function_exists('bcn_display') && !is_page(PAGE_ID1) && !is_page(PAGE_ID2)):?>
    <div class="breadcrumbs" typeof="BreadcrumbList" vocab="https://schema.org/">
        <?php bcn_display();?>
    </div>
    <?php endif; ?>

    This will prevent the div (or if you wish to, replace div with nav) element from being output when the breadcrumb trail is not included on the page due to whatever condition you place in the if statement.

Viewing 15 replies - 586 through 600 (of 2,399 total)