Excluding a category
-
Hi. I want to hide certain categories from being shown, by editing the code below:
<footer class="entry-meta"> <?php /* translators: used between list items, there is a space after the comma */ $categories_list = get_the_category_list(__( ', ', 'catchbox' ) ); /* translators: used between list items, there is a space after the comma */ $tag_list = get_the_tag_list( '', __( ', ', 'catchbox' ) ); if ( '' != $tag_list ) { $utility_text = __( '<b>Region:</b> %1$s | <b>Branche:</b> %2$s', 'catchbox' ); } elseif ( '' != $categories_list ) { $utility_text = __( '<b>Region:</b> %1$s | <b>Branche:</b> %2$s', 'catchbox' ); } else { $utility_text = __( '<b>Region:</b> %1$s | <b>Branche:</b> %2$s', 'catchbox' ); } printf( $utility_text, $categories_list, $tag_list, esc_url( get_permalink() ), the_title_attribute( 'echo=0' ), get_the_author(), esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) ); ?>
I know I can do something along the lines of this:
<?php wp_list_categories('orderby=name&show_count=1&exclude=5'); ?>
but I’m not sure where to put it in the above code for it to work.Can someone help?
- The topic ‘Excluding a category’ is closed to new replies.