• How do I hide the tagline in my html title tag? Right now the code is simply: <title><?php wp_title('-', true); ?></title> yet it displays the title and the tagline, so I don’t see how to hide the tagline.

    Do I just make the tagline blank in the dashboard?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The tagline of your site is usually generated using the following line:

    <?php bloginfo('description'); ?>

    It’s this code that you’ll have to remove if you want to disable the tagline from your site completely.

    Theoretically, leaving the tagline blank in the dashboard could work but, depending on your theme, could create unnecessary white space.

    If you’re making changes to a theme, don’t forget to create a child theme first. ?? codex.www.ads-software.com/Child_Themes

    Thread Starter dave1234

    (@dave1234)

    The code <?php wp_title('-', true); ?> is outputting: “My Site Title – My Site Tagline” on the home page.

    On all other pages it outputs “My Site Title – This Page Title”

    This is a complete mystery to me, because I checked the database, I checked through the code, it makes no sense that it’s having this output on the home page ??

    What theme are you using? Where did you download it from?

    Thread Starter dave1234

    (@dave1234)

    https://www.ads-software.com/themes/evolve but, version 2.4.1 (I started working on this website a while ago)

    Well, I still have no idea why it’s doing that, but I worked around the problem like this:

    <title>
    	<?php
    	if (is_front_page())	{
    		bloginfo( 'name' );		}
    	else	{
    		wp_title('-', true);	}
    	?>
    	</title>

    Thanks for posting your solution to your problem. That doesn’t always happen, and it helps others that have similar issues.

    I wonder, have you ever thought about SEO? Keeping the same page title in your title tag works against you with the search engines. Instead of managing your title tag in your template files I would recommend using Yoast’s SEO plugin so that you can have more control over your page titles and avoid the penalty you’ll get from the search engines.

    Thread Starter dave1234

    (@dave1234)

    Well, it’s not the same title exactly right? My front page will be:
    My Site Name

    and my other pages will be:

    My Site Name – Page 1 Name
    My Site Name – Page 2 name
    My Site Name – A post name
    etc

    That’s the same way (breadcrumbs) it’s done here at www.ads-software.com. Is that out these days? For example the title of the page we are on is
    “WordPress – Support – How do I hide tagline in the title tag?”

    Are you saying it should be only “How do I hide tagline in the title tag?”

    I’m genuinely interested in clarifying this, because yeah I am interested in SEO. Thanks ??

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Check your analytics to see if the Home page is the most landed on, if it is then it does make some sense to tell them the website name first and then the page name. Maybe the theme’s developers made an assumption as to the Home page will be the landing page.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How do I hide tagline in the title tag?’ is closed to new replies.