I’m trying to hide specific categories from showing up on a portfolio home page.
I was told that this was the concerned line of code on the php template file
<span class="entry-skills"><?php the_terms($post->ID, 'skill-type', '', ', ', ''); ?></span>
but there is no way to exclude certain types from this function by default. I would need to create a custom function in order to do so.
since I don’t know much about php, I was thinking maybe some kind of expert could help me over here ? thanks
I haven’t tested this, so it might need to be tweaked (specifically, I’m not sure if I got the names of the params right on the term object), but this should get you most of the way there.
I used the
get_the_terms
filter because it’s the last filter before the terms are turned to HTML, which makes it significantly more difficult to parse. If you’re a complete novice with PHP and need help troubleshooting or implementing, post a comment. Good luck!