I created a function to redirect all the products with the tag 'ABC' to a different page (for logged-out users only).
is_singular('download') && has_term(array('ABC'), 'download_tag')
The problem is that logged-in users can still access the page and see the 'ABC' tag in the tags list.
What's the function that I can add to the functions.php file that will only hide the ABC tag specifically?
Thank you
You can hook into
get_object_terms
to filter terms before they are displayed. Here's an example: