to dir
cp/wp plugin: breadcrumb navxt - NOTES                          rev 28 feb 2021

Category: navigation
cp/wp: classicpress and wordpress 
webwalker: useful


.......................................................
description: 

  Makes nice breadcrumb trail for your posts and pages.

.......................................................
sources: 

  Plugin page:
    https://wordpress.org/plugins/breadcrumb-navxt

  WordPress forums:
    https://wordpress.org/support/plugin/breadcrumb-navxt
    https://wordpress.org/search/classicpress+breadcrumb-navxt/?forums=1
  ClassicPress forums:
    https://forums.classicpress.net/search?q=%22breadcrumb%20navxt%22

  Docs and code:
    https://mtekk.us/code/breadcrumb-navxt/
    https://mtekk.us/code/breadcrumb-navxt/breadcrumb-navxt-doc/


    On plugin page, or under Settings sidebar menu.

  Version recommendation: FREEZE at n.n | UPDATE OK

_______________________________________________________ 
➽ Install/config/uninstall:


......................... 
install:

  the usual.


......................... 
settings:

    under Settings sidebar menu.
    has its own sidebar menu
    settings link on plugin page


.........................
uninstall:

  - deletes from database?

  tables: 
 


_______________________________________________________ 
➽ Notes:

.......................................................
title, htitle, ftitle, ...

    https://mtekk.us/archives/guides/making-sense-of-the-title-breadcrumb-template-tags/

....................................................... 
* Don't display the final breadcrumb (the current page):

    https://wordpress.org/support/topic/hiding-current-page-from-breadcrumbs-for-posts/
    - plugin to do it: 
        https://github.com/mtekk/Breadcrumb-NavXT-Extensions/blob/master/breadcrumb_navxt_remove_curitm.php
    - css:
       if you don't mind the separator being there, or even want it there.
        div.breadcrumbs span.current-item {
          display: none;
        }

....................................................... 
* Use only on specified page hierarchy:
    This worked on webwalker.to/support/ tree [26 nov 2019]
        and simple:
      <?php 
        global $wp;
        if  (    !is_home() 
              && !is_front_page() 
              && is_page('support')         
              || preg_match( '#^support(/.+)?$#', $wp->request ) 
            ) { ?>
			// show the breadcrumbs
      <?php } ?>
      (from https://wordpress.stackexchange.com/questions/19775/a-function-like-is-page-but-returns-true-if-on-any-sub-page-of-given-page )

      Other solutions (mostly using page id, and covering more scenarios):
        - https://sridharkatakam.com/useful-functions-checking-pages-sub-pages-wordpress/
        - https://css-tricks.com/snippets/wordpress/if-page-is-parent-or-child/
        - https://www.isitwp.com/check-if-page-is-child-advanced-w-id-or-slug/


.......................................................
change title used in breakcrumb trail:   [9 dec 2019]

  use filter 
    bcn_breadcrumb_title 


.......................................................
calling within the loop:   

  - by default Breadcrumb NavXT caches the breadcrumb trail. So,
    if you were to place bcn_display() in the search results loop, you
    would only get the breadcrumb trail for the first result repeated
    for every result. For situations like this, the fourth argument
    for the bcn_display functions was added. To achieve what you want
    to do, you'll want to use something like bcn_display(false, true,
    false, true) instead of the usual bcn_display().
      https://wordpress.org/support/topic/breadcrumbs-in-search-results/#post-11950910
      [20 sep 2019]


....................................................... 
* Change page title in breadcrumb path:
    For example, my 'support' page has a long title.
      in the breadcrumb, i just want it to say 'support'.

    - This works:
---------------------------------------
add_filter( 'bcn_breadcrumb_title', 'drg_breadcrumb_title_swap', 3, 10);
function drg_breadcrumb_title_swap( $bcn_title, $a_type, $pg_id ) { 
    // The main support page:
    $sprt_page_id = 478;
    // replace with shorter text:
    if ( in_array( 'post', $a_type) ) { 
        if ( $pg_id === $sprt_page_id ) { 
             $bcn_title = __('support');
        }
    }
    return $bcn_title;
}


.........................
* Remove home link only on certain pages/sections:

    https://wordpress.org/support/topic/remove-home-4/#post-14029254
    [9 feb 2021]


.........................
* breadcrumb navxt and wpml compatibility

  Info at 
    https://mtekk.us/archives/wordpress/plugins-wordpress/breadcrumb-navxt-and-wpml-compatibility/
    25 may 2014
    "Within Breadcrumb NavXT, every attempt is made to use the
    WordPress API, when possible, to maximize the compatibility
    with other plugins such as WPML. Occasionally, this is not
    enough and the findings of this investigation are presented in
    this article."


  Breadcrumb NavXT WPML Extensions plugin
    https://mtekk.us/extensions/breadcrumb-navxt-wpml-extensions/
    "improves Breadcrumb NavXT’s support for WPML Multilingual CMS. 
     With Breadcrumb NavXT WPML Extensions, string based settings within 
     Breadcrumb NavXT and Custom Post Type root pages are now 
     translatable within WPML Multilingual CMS."
    Changelog given here.


.......................................................
more info:



.......................................................
other plugins of same type:




_______________________________________________________
begin 26 nov 2019
-- 0 --