Forums

Changing Page Title of a Static Page (3 posts)

  1. linnslingerie97
    Member
    Posted 2 years ago #

    Hi,

    I'm using the default word press theme and I really need to change the Title Tag of my main page. I've set my main page to a static page (not post page).

    I've tried 'Gregs SEO' and 'Head Space', but they just don't seem to change the Page Title, of a static main page.

    If anyone could help me with either the plugins or better still, PHP code in CSS editor (to manually change the static page title), I would really appreciate it.

    Thanks

    Andy

  2. alchymyth
    The Sweeper
    Posted 2 years ago #

    this is the code of the meta title tag in header.php:

    <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>

    depending on what you want:
    show extra text:

    <title><?php if(is_front_page()) { echo 'extra text to show on front page - '; }; wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title>

    show alternative text:

    <title><?php if(is_front_page()) { echo 'show only this on front page'; } else {wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name');} ; ?></title>
  3. linnslingerie97
    Member
    Posted 2 years ago #

    WOW! Exactly what I wanted! Thanks so much!

    I spent most of yesterday, downloading and going through SEO plug-ins and you've solved it, in one post :D

    Thanks again, alchymyth

    Andy

Topic Closed

This topic has been closed to new replies.

About this Topic