WordPress.org

Ready to get started?Download WordPress

Forums

Page title Display (5 posts)

  1. giles
    Member
    Posted 7 years ago #

    Ok I am using wordpress with the option of Home page is a set page .. and that makes my blog page the News page in my case. Thats all set up fine and working great.

    As has been mentioned before the journal unfortunately then choose to set the most recent post as the wp-title statement.

    This sucks when i want the page to be NEWS.

    Ok I worked it out for the Header in the content of the page .. I put this in :

    <h1><a href="<?php the_permalink() ?>" rel="bookmark">
    <?php if (is_home()){echo 'News ';}
    else
    { ?>
    <?php wp_title(' '); ?>
    <?php if(wp_title(' ', false)){echo '';} ?>
    <?php ;} ?>
    </a>
    </h1>

    However in the title of the Browser I can't get it to work .. this is my last working of some code .. if anyone can help me out .. or make both sets of code better I would be SO thankful.

    <title>
    <?php if (is_home()){bloginfo('name');echo ' : News';}
    else
    { ?>
    <?php bloginfo('name'); ?>
    <?php if(bloginfo(' ', false)){echo ' : ';} ?>
    </title>

    please someone be a genius !

  2. giles
    Member
    Posted 7 years ago #

    btw this is my crappy work around that works ok for the browser title in the head but not great obviously.

    <title><?php if (is_home()){bloginfo('name');echo ' : News';}
    else
    { ?>
    <?php bloginfo('name');} ?> : <?php wp_title(' '); ?><?php if(wp_title(' ', false)) ?></title>
  3. giles
    Member
    Posted 7 years ago #

    seriously .. no one has a fix for this ?

    or does no one understand what i am talking about ?

  4. kalico
    Member
    Posted 7 years ago #

    giles, I found your post when I was searching for something to customize my <title> tag for each page/post individually. Is that what you are trying to do? If so, thy this:

    http://www.cheekyo.com/ultimate-seo-plugin-wordpress

    It allows you to set the title tag for every post or page, as well as meta description and keywords.

    HTH :)

  5. Organica
    Member
    Posted 6 years ago #

    This post by Ryan Caldwell might have an/the answer for you, though he's coming at it from a purely SEO point of view:

    http://performancing.com/tags/title-tag

    The comments http://performancing.com/optimal-title-tag-code-for-wordpress#comments also have some other takes on the code.

Topic Closed

This topic has been closed to new replies.

About this Topic