I am trying to define/use a custom Font family for the Site title of a WordPress site , tried different technique but its not working.

Some similar questions/tutorials which i have tried and not working :

How do I edit the tag without using the deprecated wp_title() function?

Custom attribute for the title tag with wp_title()

Changing site title to a custom font

How do/can i change the Site title Font Family of a wordpress site ?


You have to clarify which custom font, as your question is too broad. Is the custom font available through Google Fonts or which other source? If it is accessible through Google Fonts then use one of the Google Fonts plugins you can find in your WP backend, this will apply the Google Fonts script all over your website.

After that it depends on the theme itself. The best thing would be for you to find out which class your site title uses (go to your main page, check your source code in browser), and then customize your main page. In the customizer you will find a 'Custom CSS' part, in which you can then customize your font family, font size etc.

  • I'm trying to change the font for the title - by adding a class <?php echo '<title class="myfont">' . wp_get_document_title() . '</title>' . "\n"; ?> but its not working ... – pradip Jan 17 '18 at 4:27
  • You are trying to change the font that displays in the browser tab? – D. Dan Jan 17 '18 at 7:47
  • Yes .... but somehow it isn't working . the rest the font works on the pages / single / home / category etc /// only the title that displays in the browser tab isnt working. – pradip Jan 17 '18 at 15:49
  • here is another link with almost similar question, but it not helping much. [link]stackoverflow.com/questions/13579477/… – pradip Jan 17 '18 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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