Not sure that this is the best decision, but you can use the filter to cut your special tag without modifying templates.
add_filter('the_tags', 'wpse_320497_the_tags');
function wpse_320497_the_tags($tags) {
$exclude_tag = 'word';
// You can add your own conditions here
// For example, exclude specific tag only for posts or custom taxonomy
if(!is_admin() && is_singular()) {
$tags = preg_replace("~,\s+<a[^>]+>{$exclude_tag}</a>~is", "", $tags);
}
return $tags;
});
If you confused with regexp, you can rewrite it with explode
and strpos
functions.
Hope it helps.
Related Posts:
- Why is wp_kses not keeping style attributes as expected?
- WordPress: Can I add categories/tags to all sites in my network at once?
- How to Get Next or Previous Post in a Specific Tag?
- Stop wordpress from removing HTML attributes
- What is the difference between terms and tags?
- How to use the Tag description as the title attribute?
- Apply class to the a tag link generated in post tag links
- Display tags for current post in sidebar
- Showing all tags in admin -> edit post
- Redirect Tag to Post with the same name
- Add exception for specific tag
- Link from tags to tag pages displaying all posts with that tag
- How can I extend Quick Edit option with 2 more fields
- How to separate the tags?
- Creating a unique, linked list of tags from a specific category?
- Massive Tags Remove Using MySQL
- Add # before each tag
- Quicktags on all textarea.. Not working on plugin?
- term/tag not being saved for custom post type
- require one tag for each post
- WP API Get post with tag names instead of tag ID’s
- get_terms with more than x post count
- Why ‘C++’ tag is converted to ‘C# ‘?
- How to show tags in posts, orderby count(most used) not alphabetically?
- Strict tag list – user should choose only existing tags for posts
- Display all posts of current viewing tag
- Display custom list of tags in post/page editor with hooks
- Displaying Posts by tag dynamically in WordPress
- How to not show tags if the post doesn’t have any?
- Tag with Alias capability
- How to remove tag base from permalinks
- Creating a “Tags” page with search option, instead of using a widget
- Remove the last character from tag name in tag archive page
- Use current date as tag?
- How to Override “Blog pages show at most” in tag.php [duplicate]
- mystery tags which I didn’t add – vulnerability?
- Return post tags with description
- Get tags for post_type
- Line of Tag information Is Formatted Strange
- How can I make an auto-fill search box auto-completing with the tags?
- How to hide certain tags from the_tags()?
- OG Meta Tags not being scraped by facebook or twitter
- How to get the Tags on Publish post hook?
- Cross Site Related Posts?
- List tags by certain letter issue with special chars like å, ä and ö
- Strip and tags from a specific div
- Get Adjacent Post By Tag
- How to enable all Tag Descriptions in loop?
- Remove short link tag from particular page
- Stop wordpress from adding html tags but not remove my own tags?
- merging terms programmatically while maintaining the count
- Why is Heading tag Auto applied to Post data? [closed]
- Add text to Title dynamically using tags
- Tagcloud: different color for different text size
- How to get tags outside of loop for specific page I’m on?
- “ Language notation in the post content
- how do i put “h1” tag in css as class and call it anywhere in the website files [closed]
- How to make tag pages look as /tags/%tagname%/ in the URL?
- Sort tags by first letter or included number
- WordPress tags as twitter sharer URL hastags
- Add post tag without post id
- Removing a taxonomy term
- Changing H1 to Normal Links
- How to change tag Title to its name?
- Setup proper 301 redirect for deleted tags
- Problem using the word “RSS” as a tag
- Bumping a (tagged) post to the top of archives
- How to set thumbnail for each tag?
- Missing tags, unexisting tags in search form within products, please help
- Detect tag page and include an Image for that specific tag
- Tags page not for post
- How can I automatically hyperlink tag names that are in my post body to the tag page
- Remove link and Add class to get_the_tag_list()
- Random tag in the post
- How to get tags from different blog?
- Unwanted word behind my title in SERP
- Insert text BEFORE the “tag” title
- Unable to Change Title in WordPress Dashboard
- tag based subscription
- How to Group While Loop “Results” of wp_query?
- Remove parentheses from tag cloud count
- get_the_tags function not retrieve all tags for specific category
- Auto-Tagging a Custom Post Type
- Conditional tag for attachment posts
- Get multiple tags by slug
- Hide Tag Title When No Tags
- Feedburner closing error
- Change CSS on tag in tagcloud, if ther current post is tagged with the tag
- Display posts containing at least 1 from a list of say 10 tags but not containing other tags
- WordPress editor, change code wrap (bbpress?)
- where to find on backend to amend and edit title tage for each page on website?
- Create a separate widget for both Tags and TagsCloud?
- How to make a Post Tag primary?
- How can I edit the slugs of tags?
- Listing tags with custom html output
- Exclude specific tag or tags from related posts?
- Show tags in post? Function not working
- How to export tag counts to excel?
- Show all tags but exclude a certain tag
- Adding support for Post Tags to a CPT added by a plugin