Hide specific category term in product meta
-
Hello.
I’m trying to hide a specific category term (“Preorder” + the coma “,”) in the meta data of a product on a single product page, in the product archive page and “related product” loop too.Each product belongs to only one category ( Merch, Records, Print or Goodies) and sometimes to the Preorder category as well. I never want the “Preorder” category term to be displayed in meta data.
I’ve been trying to tweak the meta.php file in my child theme but couldn’t make it work.
I also thought about using CSS todisplay:none
thespan:last-of-type
but since the category terms are displayed in alphabetical order it doesn’t work as I have some categories like “Print”.I think there might be a solution with filter hooks in my functions.php but I don’t have enough knowledge to find the solution.
Any idea how I could do that ?
I’m working on a local environnement atm so here is a pic to show what I want to remove: https://ibb.co/znkwH41
Thanks !
- The topic ‘Hide specific category term in product meta’ is closed to new replies.