0

I have a website that uses the theme Bodega and uses portfolio categories. Right now I have a page like this: http://185.56.86.90/~onetoncr/manitoulifeandhome.com/property-services/. And it displays the categories beneath the pictures.

I want to hide the category Property Portfolio but I want the other categories to still be showing. Is there a code I can put into the functions.php to hide that specific category? The slug for it is property-portfolio.

I have looked at this post: https://kriesi.at/support/topic/hide-specific-categories-from-meta/ and it was successful on a previous site I did but because this one uses a category slug instead of ids, I'm not sure how to get this one to work on this site.

0

You can use the same code, you just have to find the id of your category by slug. Yo can do this by adding :

  $idObj = get_category_by_slug('category-slug'); 
  $id = $idObj->term_id;

And then put $id in your excluding array. the function is documented here : wordpress documentation

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.