Support » Plugin: Breadcrumb NavXT » he does not show me breadcrumbs

  • I have the plugin installed and active

    I use the latest WP version and the BRIDGE + woocommerce template

    I can not make the subject show the breadcrumbs … I do not know what to do anymore.

    P.D:

    What the website shows now is the template, the BRIDGE tracking code, but I do not like it, because it avoids many categories.

    Theirs is much more specific and shows much better the chain of links, categories and products.

    The problem is that even deactivating the BRIDGE, I can not show the breadcrumbs just where it currently appears on the web.

    Thanks for your time

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author John Havlik

    (@mtekk)

    Just activating Breadcrumb NavXT will not cause a breadcrumb trail appear on your pages/articles. You need to either place the Breadcrumb NavXT widget in one of your theme’s widget areas, or modify the theme’s code to include the Breadcrumb NavXT calling code (bcn_display()).

    In practice this is not an easy task, if somebody is not familiar with PHP and at some level also familiar with some basic codes of WordPress.

    The main problem with this plugin is that generally people want breadcrumbs at the top of the main content area. In my mind it would be a nice idea for the author to create an option to set automatic to the top of the main content area without any coding. That could be disabled, if someone would like to define the breadcrumbs himself.

    Most of themes don’t have widget area in the header section of page, neither above the main content area. Setting to other widget areas, don’t work, because they cause problematic need of use position:absolute/fixed. That cause chaing reaction. Everything in the top area of the page must have eiher position:absolute or position:fixed in order to keep breadcrumbs in correct position. Taking account different width values cause huge work with CSS.

    If the container widget area or parent element of it has some positioning, it mix the system. If the theme has position for the main content area or sidebar, using position:absolute fails. In practice using conventional widget ares for this plugin just cause failures.

    I regard myself as quite good CSS-programmer but I would fail, if I would not have advice how to define the position of this plugin with PHP.

    My opinion is that this plugin is for many people currently too difficult to take into usage. The threshold should be IMO remarkable lower.

    • This reply was modified 7 months, 2 weeks ago by tapiohuuhaa.
    Plugin Author John Havlik

    (@mtekk)

    The main problem with this plugin is that generally people want breadcrumbs at the top of the main content area. In my mind it would be a nice idea for the author to create an option to set automatic to the top of the main content area without any coding. That could be disabled, if someone would like to define the breadcrumbs himself.

    While this would be nice to do, unfortunately, it is much easier said than done. The closest thing to a standard for themes regarding this is implementing the Theme Hook Alliance tha_breadcrumb_navigation filter. Of course, I am not aware of any themes that support this filter (though Breadcrumb NavXT does implement a hook for it). Without theme authors designing for a breadcrumb trail in their theme, there is not a way to automatically integrate the breadcrumb trail in an acceptable fashion. Sure, it is possible to throw the markup into the theme, however styling it properly so it looks correct in the them is very much specific to the theme. In the end, without theme author support, it requires user intervention to do properly.

    This said, the next version of Breadcrumb NavXT (6.3) is shipping with a Gutenberg Block for breadcrumb trails. While still not a perfect solution, it provides another means of adding the breadcrumb trail to a WordPress site.

    Why just add function calls using add_filter()?
    I have added breadcrumbs using that function.

    add_filter is generally supported in themes and it adds breadcrumbs nicely to the page to the top or bottom of the main content area regarding how the function, which creates breadcrumbs has been called.

    There could be option to set
    * to the top of the page (defaut)
    * to the bottom of the page
    * both to the top and bottom of the page
    * manual setting

    If the breadcrumb should be rendered to or bottom, the container element should have id which is different, for example id=”topbreadcrumbs” id=”bottombreadcrumbs”. Adding extra container element with additional id-attributes cause some “headashe”.

    The following code is not nice, but it works:

    function addTotop1(){
    echo ‘<div id=”breadcrumblist” class=”breadcrumblist”>’;
    }
    function addTotop2(){
    echo bcn_display();
    }
    function addTotop3(){
    echo ‘</div>’;
    }
    function addtoBottom1(){
    echo ‘<div id=”breadcrumblist-bottom” class=”breadcrumblist”>’;
    }

    function change_the_content($content) {
    $content = addTotop1().addTotop2().addTotop3().addtoBottom1().addTotop2().addTotop3().$content;
    return $content;
    }

    add_filter( ‘the_content’, ‘change_the_content’,10);

    Endeed that renders two breadcrumbs to the top and the lower has been moved bo bottom with CSS. Using bcn_display(true) it might possible to set breadcrumbs to the bottom without CSS.

    A nice idea is also to set as default for the separator span tags around “>”.

    Maybe option to use default CSS (I could propose a nice CSS for the breadcrumb trail).
    In my mind breadcrumbs in the page linked below looks nice. Disagree?

    [I would like to publish bbResolution as renewed version. I would like to add some setting for it – see https://www.sanaristikkofoorumi.net/wordpress/forums/topic/merkitse-aihe-ratkaistuksi-toiminnallisuus/#post-11108
    If you can give some advice, I would be delighted.]

    Something like this could work in the functions.php or corresponding file in this plugin:

    function renderOwnBreadcrumbs($position){
    if($position==’bottom’){$pos=’-bottom’;}else{$pos=’-top’;}
    $breadcrumbs='<div id=”breadcrumblist’.$pos.'” class=”breadcrumblist”>’;
    if($position==’top’) echo $breadcrumbs;
    if($position==’bottom’){
    $breadcrumbs=$breadcrumbs.bcn_display(true);
    }else{echo bcn_display();}
    $breadcrumbs=$breadcrumbs.'</div>’;
    if($position==’bottom’){
    return $breadcrumbs;}else{echo ‘</div>’;}
    }

    function addBreadCrumbs($content) {
    if($bbNavSetting[‘top-breadcrums’] || $bbNavSetting[‘both-breadcrums’])
    $top = renderOwnBreadcrumbs(‘top’);
    if($bbNavSetting[‘bottom-breadcrums’] || $bbNavSetting[‘both-breadcrums’])
    $bottom = renderOwnBreadcrumbs(‘bottom’);
    $content =$top.$content.$bottom;
    return $content;
    }
    if($bbNavSetting[‘top-breadcrums’]!=’manual’)
    add_filter( ‘the_content’, ‘addBreadCrumbs’,10);

    I tested the basic idea of this and it worked ok.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘he does not show me breadcrumbs’ is closed to new replies.