exclude category to Breadcrumbs
-
Hello, (sorry for my English) I’m looking for a way to exclude certain categories from the function breadcrumb but I can not find a solution, so I ask for your help. this is my code: (thanks in advance for the help)
function the_breadcrumb() { global $post; if (!is_home()) { echo '<a href="'.get_option('home').'">'.home.'</a>'; if (is_category()) { echo " / "; echo single_cat_title(); } elseif(is_single() && !is_attachment()) { $cat = get_the_category(); $cat = $cat[0]; echo " / "; echo get_category_parents($cat, TRUE, ' ' . $delimiter . ' '); echo " / "; echo the_title(); } elseif (is_search()) { echo " / " . cerca; } elseif (is_page() && $post->post_parent) { echo ' / <a href="'.get_permalink($post->post_parent).'">'; echo get_the_title($post->post_parent); echo "</a> / "; echo the_title(); } elseif (is_page() OR is_attachment()) { echo " / "; echo the_title(); } elseif (is_author()) { echo wp_title(' / Profilo'); echo ""; } elseif (is_404()) { echo " / "; echo errore_404; } elseif (is_archive()) { echo wp_title(' / '); } } }
- The topic ‘exclude category to Breadcrumbs’ is closed to new replies.