WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] wp_head() adding site title? (14 posts)

  1. Hidoshi
    Member
    Posted 1 year ago #

    So I'm working from the ground up and I chose to install blankslate as the theme I'd get started with. I've been modifying it into something more complicated, but realized I couldn't get rid of one piece of text: the site title.

    Now, I've removed the actual inline text which displays the site title and site description, largely because my client wants an image. That's all fine and dandy. But the site title remains.

    I removed wp_head() at one point for a temporary purpose and it suddenly also fixed the issue of the site name displaying. I add it back and the site name comes back.

    Now, obviously wp_head() is critical to WordPress so I can't get rid of it. But how do I hide the site name?

  2. tiaanswart
    Member
    Posted 1 year ago #

    do you have a url for the site?

    1 of 2 things (i think):

    1 you have a plugin that hooks to wp_head or the theme hooks to wp_head

    1 way to get rid of it is with CSS do a text-indent: -99999px;

  3. esmi
    Forum Moderator
    Posted 1 year ago #

    wp_head() has absolutely nothing to do with the site's title or its title as displayed in the tab of a browser. The latter is controlled by the wp_title() function in most themes.

  4. tiaanswart
    Member
    Posted 1 year ago #

    thanks esmi however could it be that a functions hooks to wp_head and ads the title dynamically like a seo plugin?

    I realize now what i said with the indent is incorrectly stated as this is not a title as in h1 or h2 tag but the title tag.

  5. esmi
    Forum Moderator
    Posted 1 year ago #

    could it be that a functions hooks to wp_head and ads the title dynamically like a seo plugin?

    No. They would be hooking into wp_title() and modifying its output via a filter.

  6. Hidoshi
    Member
    Posted 1 year ago #

    The site is at http://featherweightcreations.com and the code is:

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php wp_title(' | ', true, 'right'); ?><?php bloginfo('name'); ?></title>
    <link rel="stylesheet" type="text/css" href="<?php bloginfo('stylesheet_url'); ?>" />
    <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
    <?php wp_head(); ?>	
    
    </head>
    <body <?php body_class(); ?>>
    <div id="wrapper">
    <div id="branding">
    <img src="http://featherweightcreations.com/images/feather_logo.png" class="logo">
    <a href="<?php echo home_url() ?>/" rel="home"><?php bloginfo( 'name' ) ?><img src="http://featherweightcreations.com/wp-content/themes/cardboardSamurai/images/featherweight_title.png" class="title_block"></a>
    </div>
    <div id="container">
  7. tiaanswart
    Member
    Posted 1 year ago #

    cool thanks esmi

    hidoshi remove <?php wp_title(' | ', true, 'right'); ?> from title tag

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    I have to say, though, that I'm a little confused as to why anyone would want to remove their meta-title tag. apart from anything else, it's often used by Google in search result listings. So this is not something that I would advise, personally.

  9. Hidoshi
    Member
    Posted 1 year ago #

    But in the case of <title></title> isn't it just displaying the title within the browser's title bar? I don't want that part going away.

    Edit: Also, tried removing it. Still displaying the text.

  10. esmi
    Forum Moderator
    Posted 1 year ago #

    <title></title> isn't it just displaying the title within the browser's title bar?

    <title></title> can only be used to display the site's title in the browser tab and in search engine results. It has no bearing on the site's title as displayed within the body of a page.

  11. Hidoshi
    Member
    Posted 1 year ago #

    So I'm still confused as to how to remove the actual site name in the body. It actually does vanish if I clip out wp_head() from the header, but obviously I don't wanna do that. I just really want to get the text to vanish.

    Sorry if I'm a bit net-dumb. As much as I know about kludging, this one's escaping me.

  12. esmi
    Forum Moderator
    Posted 1 year ago #

    You cannot remove wp_head(). It's a primary hook used by WordPress internally as well as by many plugins and themes. Have you tired examining the site title using a tool like Firebug?

  13. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    the text on the screen comes from:

    <?php bloginfo( 'name' ) ?>

    in this line:

    <a href="<?php echo home_url() ?>/" rel="home"><?php bloginfo( 'name' ) ?><img src="http://featherweightcreations.com/wp-content/themes/cardboardSamurai/images/featherweight_title.png" class="title_block"></a>

    however, how this would be influenced by 'wp_head()' is mysterious ...

  14. Hidoshi
    Member
    Posted 1 year ago #

    Ahh, that fixed it. Thanks alchymyth!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags