7 replies
  • WEB DESIGN
  • |
The title of my wordpress blog is Exercise and Nutrition Tips. I ran a title tag analysis and it includes my description and says my title tag is to big. It shows:
<title>Exercise and Nutrition Tips » Helping people reach their fitness goals</title>

Here is my header.php for <title>
<title>
<?php if ( is_home() ) { ?><?php bloginfo('name'); ?> &raquo; <?php bloginfo('description'); ?><?php } ?>
<?php if ( is_search() ) { ?>Search Results &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_author() ) { global $wp_query; $curauth = $wp_query->get_queried_object(); ?>Author Archives &raquo; <?php echo $curauth->nickname; ?> &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_single() ) { ?><?php wp_title(''); ?> &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_page() ) { ?><?php wp_title(''); ?> &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_category() ) { ?><?php single_cat_title(); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_year() ) { ?><?php the_time('Y'); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_month() ) { ?><?php the_time('F Y'); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if ( is_day() ) { ?><?php the_time('d F Y'); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
<?php if (function_exists('is_tag')) { if (is_tag()) { ?><?php single_tag_title("", true); ?> &raquo; Tag Archive &raquo; <?php bloginfo('name'); ?><?php } } ?>
</title>

Is there something I should change?
  • I would just capitalize the first letter of every word. So instead of "Helping people reach their fitness goals" it would be "Helping People Reach Their Fitness Goals"
    {{ DiscussionBoard.errors[3332176].message }}
  • Profile picture of the author trainermike
    I would like for it to just show Exercise and Nutrition Tips. Is there some way to just have the title recognized as the title and not have the description included.
    {{ DiscussionBoard.errors[3332233].message }}
    • Profile picture of the author JohnyData
      Originally Posted by trainermike View Post

      I would like for it to just show Exercise and Nutrition Tips. Is there some way to just have the title recognized as the title and not have the description included.
      Yes.

      Change this:
      <?php if ( is_home() ) { ?><?php bloginfo('name'); ?> &raquo; <?php bloginfo('description'); ?><?php } ?>

      to this:
      <?php if ( is_home() ) { ?><?php bloginfo('name'); ?><?php } ?>

      Omit the &raquo; <?php bloginfo('description'); ?> section.
      {{ DiscussionBoard.errors[3332263].message }}
  • Profile picture of the author trainermike
    Thank You so much. When your new to this everything starts to look the same! Again I appreciate it.
    {{ DiscussionBoard.errors[3332286].message }}
  • Profile picture of the author mahesh2010
    Originally Posted by trainermike View Post

    The title of my wordpress blog is Exercise and Nutrition Tips. I ran a title tag analysis and it includes my description and says my title tag is to big. It shows:
    <title>Exercise and Nutrition Tips » Helping people reach their fitness goals</title>

    Here is my header.php for <title>
    <title>
    <?php if ( is_home() ) { ?><?php bloginfo('name'); ?> &raquo; <?php bloginfo('description'); ?><?php } ?>
    <?php if ( is_search() ) { ?>Search Results &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_author() ) { global ; = (); ?>Author Archives &raquo; <?php echo ; ?> &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_single() ) { ?><?php wp_title(''); ?> &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_page() ) { ?><?php wp_title(''); ?> &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_category() ) { ?><?php single_cat_title(); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_year() ) { ?><?php the_time('Y'); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_month() ) { ?><?php the_time('F Y'); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if ( is_day() ) { ?><?php the_time('d F Y'); ?> &raquo; Archive &raquo; <?php bloginfo('name'); ?><?php } ?>
    <?php if (function_exists('is_tag')) { if (is_tag()) { ?><?php single_tag_title("", true); ?> &raquo; Tag Archive &raquo; <?php bloginfo('name'); ?><?php } } ?>
    </title>

    Is there something I should change?
    Hi,
    You can store this in a variable and then display it in a head part
    this would reduce the length of your title tag
    {{ DiscussionBoard.errors[3332409].message }}

Trending Topics