How do I remove Wordpress Blog Title from showing in the html title?

15 replies
How do I remove Blog Title from showing in the html title?

I only want the Blog Title to be displayed in the html title on the homepage, but for other plages, I only want the Post Title to be displayed.

This is a post on my blog:
World
#blog #html #remove #showing #title #wordpress
  • Profile picture of the author Ken_Stone
    I looked at your blog.

    Not sure I understand your question.

    Are you trying to get rid of the "Archive" link at the top navigation bar?

    If so install the "Exclude Pages" or "Exclude Posts" free plugins.
    {{ DiscussionBoard.errors[9620962].message }}
  • Profile picture of the author Member8200
    Originally Posted by MindReality View Post

    How do I remove Blog Title from showing in the html title?

    I only want the Blog Title to be displayed in the html title on the homepage, but for other plages, I only want the Post Title to be displayed.

    This is a post on my blog:
    World


    I'm sorry i don't understand the question. would you mind explaining it again?
    {{ DiscussionBoard.errors[9621051].message }}
  • Profile picture of the author MindReality
    What I mean is that if you go to a post, and look at the title that shows up in the browser (hover mouse cursor over the browser bar) you will see the post title along with the blog title. Also, when I post it to Facebook, the post title and blog title shows up. How can I prevent the blog title from showing up?
    Signature
    Discover The Greatest Secrets Of The Mind And Reality That Will Get You Anything You Desire, Almost Like Magic! Visit: http://www.MindReality.com
    {{ DiscussionBoard.errors[9621052].message }}
  • Profile picture of the author IgniteFeed
    Checkout this post - https://wordpress.org/support/topic/...earing-in-post

    May need to pass a variable. Workable solutions anyways
    {{ DiscussionBoard.errors[9621354].message }}
    • Profile picture of the author MindReality
      Originally Posted by IgniteFeed View Post

      Checkout this post - https://wordpress.org/support/topic/...earing-in-post

      May need to pass a variable. Workable solutions anyways
      This is not what I am looking for. I do not have the Blog Title showing on the page itself. What I am trying to do is to remove it from the Title Tag in the html as well as the Open Graph.
      Signature
      Discover The Greatest Secrets Of The Mind And Reality That Will Get You Anything You Desire, Almost Like Magic! Visit: http://www.MindReality.com
      {{ DiscussionBoard.errors[9621419].message }}
  • {{ DiscussionBoard.errors[9622089].message }}
  • Profile picture of the author mikea12
    It's between your <head></head> tags example

    Code:
    <head>
            <meta charset="utf-8">
            <meta http-equiv="X-UA-Compatible" content="IE=edge">
            <title></title> // here is where you can change the title
            <meta name="description" content=""> // or here
            <meta name="viewport" content="width=device-width, initial-scale=1">
    
            <link rel="apple-touch-icon" href="apple-touch-icon.png">
            <!-- Place favicon.ico in the root directory -->
    
            <link rel="stylesheet" href="css/normalize.css">
            <link rel="stylesheet" href="css/main.css">
            <script src="js/vendor/modernizr-2.8.3.min.js"></script>
        </head>
    You should find this in your theme files header.php, that may be obvious and I know WP is dynamic so usually you should set this within the backend, but you can check your header.php and see whats up.

    So after reading your question again, see what wp hook is added there and that should give you an indicator of why blog titles are being added.

    Find that hook then use the WP codex to see what it does.
    {{ DiscussionBoard.errors[9623495].message }}
    • Profile picture of the author MindReality
      Originally Posted by mikea12 View Post

      It's between your <head></head> tags example

      Code:
      <head>
              <meta charset="utf-8">
              <meta http-equiv="X-UA-Compatible" content="IE=edge">
              <title></title> // here is where you can change the title
              <meta name="description" content=""> // or here
              <meta name="viewport" content="width=device-width, initial-scale=1">
      
              <link rel="apple-touch-icon" href="apple-touch-icon.png">
              <!-- Place favicon.ico in the root directory -->
      
              <link rel="stylesheet" href="css/normalize.css">
              <link rel="stylesheet" href="css/main.css">
              <script src="js/vendor/modernizr-2.8.3.min.js"></script>
          </head>
      You should find this in your theme files header.php, that may be obvious and I know WP is dynamic so usually you should set this within the backend, but you can check your header.php and see whats up.

      So after reading your question again, see what wp hook is added there and that should give you an indicator of why blog titles are being added.

      Find that hook then use the WP codex to see what it does.
      I couldn't find wp_title() in the header.php

      That is the first place I looked.
      Signature
      Discover The Greatest Secrets Of The Mind And Reality That Will Get You Anything You Desire, Almost Like Magic! Visit: http://www.MindReality.com
      {{ DiscussionBoard.errors[9623506].message }}
  • Profile picture of the author cassihl
    Post the code in your header.php - if you don't have wp_title, then there shouldn't be a Title.
    {{ DiscussionBoard.errors[9623514].message }}
    • Profile picture of the author MindReality
      Originally Posted by cassihl View Post

      Post the code in your header.php - if you don't have wp_title, then there shouldn't be a Title.
      Post what code?

      This is my entire header.php code:

      Code:
      <?php //this is just for the doctype and <head> section
      get_template_part('theme-partials/header/head');
      
       = '';
      
       = '';
      if (is_single()) {
      	 = get_post_format();
      
      	switch () {
      		case 'video' :
      			 .= 'itemscope itemtype="http://schema.org/VideoGallery"';
      		default:
      			 .= 'itemscope itemtype="http://schema.org/Article"';
      	}
      } else {
      	 .= 'itemscope itemtype="http://schema.org/WebPage"';
      }
      
      if(wpgrade::option('nav_inverse_top') == 1)  .= " nav-inverse-top";
      if(wpgrade::option('nav_inverse_main') == 1)  .= " nav-inverse-main";
      if(wpgrade::option('layout_boxed') == 1)  .= " layout--boxed";
      
      // woocommerce hotfix
      // prevent class product to overwrite our css but keep javascript dependencies
      if ( wpgrade::option('enable_woocommerce_support') == 1 && in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
      	if (is_product())
      		 .= " product";
      }
      
      if ( wpgrade::option('nav_main_sticky') == 1 )
           .= "  sticky-nav";
      
      ?>
      
      <body <?php body_class(); ?> <?php echo  ?> >
          <div class="pace">
              <div class="pace-activity"></div>
          </div>    
          <div id="page">
              <nav class="navigation  navigation--mobile  overthrow">
                  <h2 class="accessibility"><?php _e('Primary Mobile Navigation', 'bucket_txtd') ?></h2>
                  <div class="search-form  push-half--top  push--bottom  soft--bottom">
                      <?php get_search_form(); ?>
                  </div>            
                  <?php 
                      wpgrade_main_nav_mobile();
                      wpgrade_top_nav_left('nav--stacked', true);
                      wpgrade_top_nav_right('nav--stacked', true);
                  ?>
              </nav>    
              <div class="wrapper">
                  <?php //get the main header section - logo, nav, footer
      			get_template_part('theme-partials/header/site', wpgrade::option('header_type')); ?>
      As you can see, it does not contain the wp_title but yet the Blog Title still appears in the html title tag in the browser and the view source code:
      World
      Signature
      Discover The Greatest Secrets Of The Mind And Reality That Will Get You Anything You Desire, Almost Like Magic! Visit: http://www.MindReality.com
      {{ DiscussionBoard.errors[9623530].message }}
  • Profile picture of the author cassihl
    Ah, here it is:
    theme-partials/header/head

    There is another file that is being pulled in. Find this 'theme-partials/header/head' in your theme files, and you'll find wp_title. It might be a separate file, or it might be in your functions.php
    {{ DiscussionBoard.errors[9623534].message }}
  • Profile picture of the author mikea12
    Yeah it should be in that partial, I am willing to bet the dev did that to keep meta info there, but I think thats a little to much separation. Good luck.
    {{ DiscussionBoard.errors[9623550].message }}
    • Profile picture of the author MindReality
      Thanks, I found the head.php

      But it shows <title><?php wp_title('|', true, 'right'); ?></title>

      How do I remove the blog name from the title but still show the post title?
      Signature
      Discover The Greatest Secrets Of The Mind And Reality That Will Get You Anything You Desire, Almost Like Magic! Visit: http://www.MindReality.com
      {{ DiscussionBoard.errors[9623598].message }}
  • Profile picture of the author cassihl
    Try removing everything so it looks like this: <?php wp_title(' '); ?> If that doesn't work, try using an seo plugin that can rewrite your title tags.
    {{ DiscussionBoard.errors[9623667].message }}

Trending Topics