In the members-only forum a user asked:
There are a number of guides for doing this with categories in Genesis with functions.php code, but I've yet to come across one that works with specific tags instead of categories.
The usage scenario is this: I have some specific tags I use for administrative purposes (eg. featured) that I use as a filter in Genesis Featured Posts Combo and similar widgets. But I don't want those showing up in the post metadata. I do want the other tags showing up, though, so I don't want to just hide all tags.
We can create a custom function hooked to
get_the_terms filter that iterates over all the tags of the current post in the loop, checking for each if it is in a custom array of tags to be excluded and if so remove it from
We make use of the above inside the function for a custom
[selected_post_tags] shortcode that shall be used instead of the standard
Tagged With: Custom Shortcode, entry meta, get_the_terms, post_tags, Tags via the
For a Post that has say, "Featured", "Slider" and "Threaded Comments" tags
where we have specified that "Featured" and "Slider" tags not be shown.
Add the following in child theme's
To view the full content, please sign up for the membership.
Already a member? Log in below or here.