How do I get rid of this symbol?

6 replies
  • WEB DESIGN
  • |
Hello, I've been trying to find the answer to this for many weeks now, but I can't seem to solve the problem. I need some assistance, and I was wondering if someone here could help me out.

The problem is whenever I open my website (| How To Focus Better) on the Google Chrome tab, this symbol "|" shows up before the phrase, "How To Focus Better".

As you can see, it looks like this:

| How To Focus Better

How can I get rid of it so it looks like this?

How To Focus Better

Someone told me this advice, but I don't understand what he means:

Ah okay. It sounds like your page that you have set to be the front page doesn't have a title for some reason. You could try pulling in a static title for the front page. You'd need to edit the header.php and use a if(is_front_page()) statement to pull in your title.

Another person told me this advice, but I can't locate the symbol:

Try editing your theme's header.php template file and removing the | symbol from the <title></title> tags.

I have posted my WordPress header.php just to provide additional information, if it helps:

Linen PRO: header.php

Code:
<?php global $linen; ?>
<!DOCTYPE html>
<html <?php language_attributes( 'html' ) ?>>
<head>
	<?php if ( is_front_page() ) : ?>
		<title><?php bloginfo( 'name' ); ?></title>
	<?php elseif ( is_404() ) : ?>
		<title><?php bloginfo( 'name' ); ?></title>
	<?php elseif ( is_search() ) : ?>
		<title><?php printf(__ ("Search results for '%s'", "linen"), get_search_query()); ?><?php bloginfo( 'name' ); ?></title>
	<?php else : ?>
		<title><?php wp_title($sep = '' ); ?><?php bloginfo( 'name' );?></title>
	<?php endif; ?>

	<!-- Basic Meta Data -->
	<meta charset="<?php bloginfo( 'charset' ); ?>" />
	<meta name="copyright" content="<?php
		esc_attr( sprintf(
			__( 'Design is copyright %1$s The Theme Foundry', 'linen' ),
			date( 'Y' )
		) );
	?>" />

	<!-- Favicon -->
	<link rel="shortcut icon" href="<?php echo get_stylesheet_directory_uri(); ?>/images/favicon.ico" />

	<!-- WordPress -->
	<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
	<?php wp_head(); ?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21871265-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body <?php body_class(); ?>>
	<div class="skip-content"><a href="#content"><?php _e( 'Skip to content', 'linen' ); ?></a></div>
	<div id="wrapper" class="clear">
		<div id="header" class="clear">
			<?php if ($linen->logoState() == 'true' ) : ?>
				<?php $upload_dir = wp_upload_dir(); ?>
				<div id="title-logo">
					<a href="<?php echo home_url( '/' ); ?>">
						<img src="<?php echo $linen->logoName(); ?>" alt="<?php if ($linen->logoAlt() !== '' ) echo $linen->logoAlt(); else echo bloginfo( 'name' ); ?>" />
					</a>
				</div>
				<?php if ($linen->logoTagline() == 'true' ) : ?>
					<div id="description">
						<h2><?php bloginfo( 'description' ); ?></h2>
					</div><!--end description-->
				<?php endif; ?>
			<?php else : ?>
				<?php if (is_home()) echo( '<h1 id="title">' ); else echo( '<div id="title">' );?><a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a><?php if (is_home()) echo( '</h1>' ); else echo( '</div>' );?>
					<div id="description">
						<h2><?php bloginfo( 'description' ); ?></h2>
					</div><!--end description-->
			<?php endif; ?>
			<?php
				wp_nav_menu(
					array(
						'theme_location'  => 'nav-1',
						'container_id'    => 'navigation',
						'container_class' => 'clear',
						'menu_class'      => 'nav',
						'fallback_cb'     => array( &$linen, 'main_menu_fallback' )
						)
					);
			?>
		</div><!--end header-->
		<?php if (($linen->sliderState() != '' ) && is_front_page() && !is_paged() ) { ?>
			<?php get_template_part( 'tmpart-featured' ); ?>
		<?php } ?>
		<?php if (is_page_template( 'tm-left-sidebar.php' )) : ?>
			<?php get_sidebar(); ?>
		<?php endif; ?>
		<div id="content" <?php if ( ( is_page_template( 'tm-no-sidebar.php' ) ) || ( $linen->sidebarDisable() == 'true' ) ) echo ( 'class="no-sidebar"' ); ?>>
Do you know how I can get rid of the pipe symbol?
#rid #symbol
  • Profile picture of the author Rovi
    The title is pulled in by the function - bloginfo( 'name' )

    Take a look in functions.php and search on "bloginfo("

    My guess is that either in the settings page where you enter the name of the blog, or in that function, the extra | and space is being added, and then loaded when you call the title in the header.php.
    {{ DiscussionBoard.errors[4036530].message }}
    • Profile picture of the author Keep Trying
      Hi Rovi, I checked the settings paged and there was no extra spaced added.

      I checked the functions.php and this is what it says:

      Code:
      <?php
      	locate_template( array( 'functions' . DIRECTORY_SEPARATOR . 'linen-extend.php' ), true );
      {{ DiscussionBoard.errors[4036937].message }}
  • Profile picture of the author JackTheLad
    It may be as simple as just having to rename the site name (blog title) in the wordpress back-end. To do this simply login to your wordpress site, click on the 'settings' tab, and then click on 'General'. The blog title will show up at the top of the form and you should simply have to take out the | symbol from there.

    Might work? Who knows.
    {{ DiscussionBoard.errors[4037987].message }}
  • Profile picture of the author Mike Hlatky
    You can just install the All-In-One SEO plugin and it should automatically correct itself.

    I have had this problem once before and that's what I did to solve it.
    {{ DiscussionBoard.errors[4038381].message }}
  • Profile picture of the author Keep Trying
    Hi, the general settings did not have the pipe symbol there. I tried the All-In-One SEO plugin and it worked though. Thank you Mike!
    {{ DiscussionBoard.errors[4039867].message }}
    • Profile picture of the author Rovi
      Good that it's fixed. I guess All-In-One overwrites the title value set up by the theme with whatever you set for each page/post.

      Cheers!
      {{ DiscussionBoard.errors[4041906].message }}

Trending Topics