I want to remove the page name from displaying in my browser's tab. How do I hide the page name and only show the name of my website?

enter image description here

  • that would be the 'meta title', and people tend to use one of the seo plugins to choose what to show. – Michael Apr 22 '17 at 5:25
  • @Michael How do I edit the meta title in WordPress for a specific page without a plugin? – Alt-Rock Ninja Apr 22 '17 at 5:54

You can either use this code in your function.php

remove_all_filters( 'wp_title' );
add_filter('wp_title', 'filter_pagetitle', 99,1);
function filter_pagetitle($title) {
    $title = get_bloginfo('name');
    return $title;

Or install plugin like Yoast SEO.

EDIT : Screenshot

enter image description here

UPDATE : Change header.php in your theme folder if above solution doesn't work for you.

<title><?php get_bloginfo('name'); ?></title>

| improve this answer | |
  • It didn't work. No change after adding it to functions.php. – Alt-Rock Ninja Apr 22 '17 at 5:54
  • Strange it works for me. check if you are using any SEO plugins or not ? – JItendra Rana Apr 22 '17 at 6:02
  • Try return ' '; instead of return $title; and see if it works. – JItendra Rana Apr 22 '17 at 6:03
  • It didn't work. – Alt-Rock Ninja Apr 22 '17 at 6:07
  • I don't use any SEO plugins – Alt-Rock Ninja Apr 22 '17 at 6:08
  • Setting Site Title in Wordpress: failed
  • Editing function.php: not found
  • Using All-in-one SEO plugin: failed
  • Editing header.php: Worked!

This is what worked for me. Your mileage may vary.

Please understand that this site does not support HTML, so I've substituted square brackets for angle brackets and '(amp)' for ampersand.

  1. Edit the following file:


  1. Find the line:

    [meta http-equiv="Content-Type" content="[?php bloginfo('html_type'); ?]; charset=[?php bloginfo('charset'); ?]" /]

  1. Add the following line after the line shown above. I copied mine from my other WordPress blog that didn't have this problem - (the advantages of dual redundancy).

    [title][?php wp_title('(amp)laquo;', true, 'right'); ?] [?php bloginfo('name'); ?][/title]

  1. Save the file and upload it to the same place on your website.

  2. Reload your blog site and hope something else isn't overwriting your site name.

| improve this answer | |

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.