-
Create custom action in
function.php
, which checks current page type (if it’s category or tag page).function hidden_term_name_action() { if( is_category() || is_tag() ){ $term_id = get_queried_object_id(); $term = get_term($term_id); if($term){ echo sprintf('<h1 style="display:none;">%s</h1>', esc_attr($term->name)); } } } add_action('hidden_term_name', 'hidden_term_name_action');
-
Paste this code in
header.php
, which fires this action and pastes term title inside hidden h1 tag.<?php do_action('hidden_term_name'); ?>
P.S. Not tested, but give it a try.
Related Posts:
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Autolinking keywords in text with tags
- Using heirarchial tags or Custom taxonomies
- Is There a Difference Between Taxonomies and Categories?
- What is the difference between a “tag” and a “category”?
- Can’t custom taxonomies have same terms (slugs) as categories?
- How do the ‘tag’ and ‘category’ (default) taxonomies do ‘save_post’ action?
- get all tags from category
- Filtering categories in the permalink structure
- 404 Error On Category and Tags Pages
- Checklist of selected categories
- Multiple post categories – single permalink
- Multiple Domain Names – One WP Install (non-Multisite) – Default Each Domain name to Category Archive
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Sort posts by tags in category pages
- How to search for categories and/or tags?
- How to get the url to tag & category base set by the user?
- Filter categories using tags
- Sticky posts on home page, search, tag and archives without plugin
- Category and tag with same name
- In the tag archive – display count of posts for each category they belong to
- Is it possible to disable certain user roles from creating tags?
- Automated adding of one tag to all the posts in a category
- Exclude most recent posts from specific category in wp_query()
- Root level category, tag, author and archive pages to work
- Deleting All tags except categories Wp database
- Remove Categories and Tags from Admin Dashboard
- Remove Archive Headline and Archive Intro Text fields on category and tag archive pages in WordPress Admin with Genesis framework
- Get tags specific category
- Category vs Tag vs Table
- Help with multiple dropdown tags search
- Custom WP_Query for current category (in category.php)?
- Hide tag and category boxes from the post editor
- Retrieve all posts within tag OR category?
- How to find the number of Tags a post has?
- How to not treat categories as tags in feeds
- Categories: A Greenhorn Question on Strategy (Not Code)
- Viewing category pages without the word ‘category’ in URL
- How to customize tag and category post listings to show introductory content?
- Warning: sizeof (): Parameter must be an array or an object that implements Countable, On products pages
- force category base – archive pages work WITH & WITHOUT category base slug in url?
- Making a tourism information website [closed]
- Search Posts / Pages with multiple options?
- How get permalink for the current category or tag?
- Display tags from specific category in select fields
- Offline WordPress Application
- Changing permalink from /postname/ to category/postname/
- Find out which user created a category or tag?
- How to make 2 tag feeds show up on 1 page?
- One Specific Category To Permalink
- Different templates for different category tags
- Site search needs to find posts for category topic AND Tag or keyword thats not in the post
- Shortcodes not working in category or tag description
- Pagination is not working properly in Product Category/Tag pages
- Get link which associated with a specific category and tag
- category url structure
- menu using category and tags
- Is there a reason I cannot get the current category in a loop?
- How to Remove a Title from All Category and Tags Page?
- How can I display tags as categories?
- How to get an array with all categories and corresponding names?
- Echo text using is_tag
- Show different title on category page
- Tags Instead of Category
- Use blog as base for tags and categories
- How to store category and tags separatly on wordpress?
- Filter categories/tags to display in multiple metaboxes for selection in back-end
- post_class remove tag- or category- from slug
- Editing Loop So It Targets Specific Tags?
- Pretty URLs with Categories and Tags
- Maintaining a separate posts page for certain categories and don’t show those on home page
- Are tags different than categories?
- What is the best way to add an advanced / intermediate / beginner tag to a post
- Show Posts via cat+cat in URL that are in both Categories doesn’t work
- Display all categories but only if they have posts in them that have a specific tag assigned
- Help to display the current categories and tags of a post
- How to add tags under categories
- Add Post Categories in Post Tags Field Programmatically
- Subcategories randomly not working after page/post/category edit in wordpress. Fix: saving permalinks twice
- Why is URL Slug Saving Differently From How It’s Been Defined?
- Hide specific category tag on single post page
- Filtering posts in category by tag URL
- How to show entries related to main category
- Automatically create tags and merge with categories
- Category pages redirecting to tab on Posts page grid
- How to assign Categories and tags inside the TinyMCE Editor for each Image?
- Re-coding category-template.php to go to custom URL
- Category and tag urls return 404 error
- Search by tag, category and author without plugin
- Limit Category/Tag Dropdown To blog_id in Multisite Install With Global Categories/Tags
- Tag Menu items based on their categories
- How to add an “All” category to the tag cloud?
- Hide category name using mod_rewrite
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- Unable to get all tags from specific categories
- htaccess redirect for all categories converted to tags now showing 404
- How to create a category or tag available exclusively to the admins and not to the users?
- altering theme – content generated by PAGES not PORTFOLIO
- Search tag within category
- Only show sub-category