Can I list which categories the current post is in – but exclude some?
-
The 2014 theme has the follow code to list the categories the current post is included in:
<span class="cat-links"><?php echo get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?></span>
I would like to list the categories, but exclude some if possible.
Stupidly I started to use this code thinking it was based on the current post. But it’s the site as a whole!
<span class="cat-links">Categories: <?php wp_list_categories('orderby=name&show_count=0&hierarchical=0&exclude=2,3&title_li=&style=none'); ?> </span>
Can anyone help me please?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Can I list which categories the current post is in – but exclude some?’ is closed to new replies.