Change Author Page Title

Hello,

We want to change the default Author page archive title output. Currently it is set at “Author: First Name Last Name”.
Any ideas on a function perhaps?

many thanks
Andrew

Hello Andrew,

Thanks for writing in! You can change the Author display name in Users > Your Profile ({Username}) > Display name publicly as and change it to your desired name to display.

Hope this helps.

No, what I meant is to change the title completely, i.e. append our own text before even the author name is displayed…

Hi Andrew,

Sorry, but we are confused, this is how your “default Author page archive” looks on our end;

Would you mind to clarify what do you want to change with that? Or were you referring to a different page? Please clarify.

Thanks,

The title in the source code reads Author: Katy Prophet. We want to append our own text before that…

I am referring to the meta title, nothing to do with the actual page!

Hi @neodjandre,

Ah, are you referring to this:

That is not the default theme author archive page title, the default is author display name | site title

You might have a plugin that is changing that, more likely an SEO plugin, please check your seo plugin settings/documentation, there should be an option to change that.

Thanks,

YES, but where in the theme is this being called? or is this part of wordpress core functionality ?

Hi @neodjandre,

The function for meta can be found on this file:
wp-content\themes\x\framework\functions\frontend\meta.php
To change it though we can use change_the_title function:

add_filter('pre_get_document_title', 'change_the_title');
function change_the_title() {
  if(is_author()){
     return 'The author title';
  }
}

Although since you have SEO plugin better to change it there.

Hope this helps.

thanks Lely, our SEO plugin cannot handle this yet… I was told to contact the theme developer but will go back to them with your solution.

You are most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.