Forum Replies Created

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

    (@mtekk)

    By default, Breadcrumb NavXT is going to try to use a taxonomy for the post hierarchy in the breadcrumb trail. To get the date to show up in the breadcrumb trail (e.g. Home > 2020 > June > 06 > Postname), you most likely had to set the “Post Hierarchy” to “Dates” (assuming this is a post of the builtin Post post type). To not have a hierarchy for the post, make sure to uncheck the checkbox for the “Post Hierarchy Display” setting (where Post is the post type in question) and then press the “Save Changes” button at the bottom of the settings page.

    Plugin Author John Havlik

    (@mtekk)

    Breadcrumb NavXT uses the titles for resources using the appropriate WordPress API calls. I assume the actual term names are as appears in the breadcrumb trail, and are longer for SEO purposes. The bcn_breadcrumb_title filter can be used to programmatically change the title of a breadcrumb (e.g. remove the extra words you don’t want). If you want a GUI to provide you a method of supplying breadcrumb trail specific titles, there is a premium extension (Title Trixx) that provides said functionality.

    Plugin Author John Havlik

    (@mtekk)

    The most likely reason this is happening is the post type “Partner” does not have an archive. Thus, the setting is disabled. However, it looks like this post type previously had an archive (the reason why the setting is checked). You can either temporarily re-enable archives for that post type (via whatever method you register that post type) and then change the setting in the Breadcrumb NavXT settings. Then disable archives for that post type again. The other option is to just reset the Breadcrumb NavXT settings to the defaults (in the Help menu, go to the Import/Export/Reset section, press the “Reset” button). The default value should be disabled for the archive display if the post type does not have archives.

    Plugin Author John Havlik

    (@mtekk)

    The structured data testing tool is a way to check what Google is capable of seeing. However, it does not necessarily reflect what the Google SERPs will have (can take time for that to update). Additionally, from what I can tell, Google is finding only one breadcrumb in the trail. This is because the Home breadcrumb template appears to be missing schema.org markup. Additionally, if you want the current item to appear in the structured data tool you will need to use something like the following as the unlinked breadcrumb template:

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

    For reference, your home template (linked) should be something like:
    <span property="itemListElement" typeof="ListItem"><a property="item" typeof="WebPage" title="Go to Home." href="%link%" class="%type%" bcn-aria-current><span property="name">Home</span></a><meta property="position" content="%position%"></span>

    Plugin Author John Havlik

    (@mtekk)

    Yeah the second code snippit he suggested won’t actually work. You can’t have breadcrumbList items that lack a URL, it will cause an error. The most correct thing to do is not display a breadcrumb on the home page (there literally will not be a trail as there will only be a single breadcrumb). Beyond that, there are ways of trying to add a URL to an unlinked breadcrumb, e.g. for your “Home Template (unlinked)” you need to use:

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

    (@mtekk)

    It looks like you have just the Yoast SEO JSON-LD BreadcrumbList, which looks correct. Google should be picking up on it, but seems to not be for some reason (and is beyond what I can really help with as we’re outside of what is generated by Breadcrumb NavXT).

    Plugin Author John Havlik

    (@mtekk)

    It looks like your current breadcrumb trail is being generated by WooCommerce. It depends on your them on how you move to using Breadcrumb NavXT (it may automatically switch when Breadcrumb NavXT is installed and activated, you may have to change a setting in the theme, or you may have to modify a theme file to call bcn_display()).

    Once you are using Breadcrumb NavXT, to ensure “shop” does not appear in the breadcrumb trail, navigate to the Breadcrumb NavXT Settings page. Under the Post Types tab, look for the Product post type. Make sure that “Root Page” is set to “-Select-” and “Archive Display” is not checked. Press the “Save Changes” button at the bottom of the page after making any changes.

    Plugin Author John Havlik

    (@mtekk)

    You should be able to control the linked property by either setting it when constructing a bcn_breadcrumb (it’s the last parameter in the constructor) or by calling set_linked(true) on your bcn_breadcrumb instance.

    Plugin Author John Havlik

    (@mtekk)

    Using the bcn_post_terms filter, you can return just the first term (in an array). Something like the following should work:

    add_filter('bcn_post_terms','my_bcn_post_term_selector', 10, 3);
    function my_bcn_post_term_selector($terms, $taxonomy, $id)
    {
    	//Check to ensure the terms list is an array and there is more than one item in it
    	if(is_array($terms) && count($terms) > 1)
    	{
    		//Return the fist item in a new array
    		return array(0 => reset($terms));
    	}
    	return $terms;
    }

    This code was taken from an article on bcn_post_terms that scheduled for release on May 15th.

    • This reply was modified 6 years, 1 month ago by John Havlik.
    Plugin Author John Havlik

    (@mtekk)

    It looks like you have two different JSON-LD format breadcrumb trails. One is being generated by Yoast SEO, I’m not sure what’s generating the second one. I recommend only using one of the JSON-LD entries.

    Plugin Author John Havlik

    (@mtekk)

    Your problem is likely due to having BeadcrumbList markup for the current item but not having a link/URL in the breadcrumb. However, please note this may not be the correct forum section for your question. This forum section is for providing support for users of Breadcrumb NavXT. As far as I can tell, you are not using Breadcrumb NavXT on the site in question (or in the code in your topic message implies you are using your own breadcrumb trail solution).

    Plugin Author John Havlik

    (@mtekk)

    Whoops, I forgot about the change in behavior in 6.4 with private posts/pages. Thanks for reporting back what you found. It’s good to hear you found the bcn_show_post_private filter and were able to use it to solve the behavior you were seeing.

    Plugin Author John Havlik

    (@mtekk)

    If you are using pages (instance of the page post type), there should only be one easy way you can end up with a breadcrumb trail for a page containing only the current item and home breadcrumbs, and that is by having the page not have a parent page (e.g. the parent property of the WP_Post object returned by get_post() for the page is empty). Otherwise, for this to happen, one of two settings would have to have been changed using custom code hooking into the bcn_before_fill action (I doubt this is the case).

    The only thing that comes to mind regarding your situation is even though it looks like the parent page is set, it actually isn’t for some reason (e.g. potentially web browser caching is “loading” a stale version of the page). If you have PHPMyAdmin (or some other MySQL admin tool), you could check the wp_posts table to see if your pages have parents set.

    Plugin Author John Havlik

    (@mtekk)

    For hierarchical taxonomies, Breadcrumb NavXT will pick the first term with a parent that is returned by WordPress. This behavior can be modified by using the bcn_pick_post_term filter. This will require some custom code, but you will have full control of what term is used. If you don’t want to write any code, both Order Bender and Breadcrumb NavXT Paths provide an interface for you to specify the preferred term in the post editor.

    Plugin Author John Havlik

    (@mtekk)

    I’m a little confused here. The source that you posted has the anchors in it, so you should see links in the rendered HTML. If you aren’t getting clickable links, my guess is either you have some other element that is overlapping the breadcrumb trail (potentially a floating/position/z-index issue), or the breadcrumb trail you are seeing on the page is not actually the one that you had in your comment. You can try using your web browser’s inspector tool to see what object is getting focus when you click on the breadcrumb trail.

    • This reply was modified 6 years, 1 month ago by John Havlik.
Viewing 15 replies - 451 through 465 (of 2,399 total)