Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Custom Breadcrumb for Category and Tag */
- function jnews_breadcrumb_call_custom( $data ) {
- if ( is_category() || is_tag() ) {
- remove_filter( 'jnews_breadcrumb', 'jnews_breadcrumb_call' );
- $id = get_queried_object()->term_id;
- $parent = JNews_Breadcrumb::getInstance();
- $breadcrumb = array();
- $breadcrumb[] = $parent->breadcrumb_text( home_url(), jnews_return_translation( 'Home','jnews-breadcrumb', 'home' ) );
- $parent->recursive_category( $id, $breadcrumb, true );
- $breadcrumb = implode( "<i class=\"fa fa-angle-right\"></i>", $breadcrumb );
- $breadcrumb = "<div id=\"breadcrumbs\">$breadcrumb</div>";
- return apply_filters( 'jnews_native_breadcrumb_category', $breadcrumb, $id );
- }
- return $data;
- }
- add_filter( 'jnews_breadcrumb', 'jnews_breadcrumb_call_custom' );
Add Comment
Please, Sign In to add comment