How to show only one category in breadcrumb navigation
get_the_category() function used to retrieve categories array of a post, and array_shift() function used to get the first item of an array. You possibly need this – function ux_breadcrumbs() { if (!is_home()) { echo ‘<a href=”‘; echo get_option(‘home’); echo ‘”>’; bloginfo(‘name’); echo “</a> » “; if (is_category() || is_single() ) { if( is_category() ) { … Read more