what is the correct function or hook to change the title of tag page ? I want to insert something at the beginning the tag title page.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Commented Sep 8, 2021 at 9:40

1 Answer 1


You can use the get_the_archive_title filter, such as:

add_filter('get_the_archive_title', function($title) {
  if(is_tag()) {
    /* logic to set $title to what you want */
  return $title;

Take a look at get_the_archive_title() reference for more information on how to use this filter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.