Adding a H1 Tag to Post Tags automatically, but hide the tag? (Same for Category)
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 … Read more