[Breadcrumbs NavXT] Define Root Page and Hide Current Item for Taxonomies

1 글 보임 - 1 에서 1 까지 (총 1 중에서)
  • 글쓴이
  • #8624
    키 마스터

    //Add in our action hook to run after the trail has been filled
    add_action(‘bcn_after_fill’, ‘bcnext_remove_current_item’);
    * We’re going to pop off the paged breadcrumb and add in our own thing
    * @param bcn_breadcrumb_trail $trail the breadcrumb_trail object after it has been filled
    function bcnext_remove_current_item($trail)
    //Check to ensure the breadcrumb we’re going to play with exists in the trail
    if(isset($trail->breadcrumbs[0]) && $trail->breadcrumbs[0] instanceof bcn_breadcrumb)
    $types = $trail->breadcrumbs[0]->get_types();
    //Make sure we have a type and it is a current-item
    if(is_array($types) && in_array(‘current-item’, $types))
    //Shift the current item off the front


1 글 보임 - 1 에서 1 까지 (총 1 중에서)
  • 답변은 로그인 후 가능합니다.
Mi Moon (美門)