Title question..

Discussion in 'HTML & Website Design' started by terryuk, Jun 29, 2006.

  1. #1
    I am wondering if its possible to change a pages title other than in the title tags. Basically my website has the same title tag throughout the site as it uses header & footer files, so is it possible to change title within the body tags?

    Thanks
     
    terryuk, Jun 29, 2006 IP
  2. NoobieDoobieDo

    NoobieDoobieDo Peon

    Messages:
    1,456
    Likes Received:
    53
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not to my knowledge.

    The only other way to change the title tag other than <title> would be to use SSI to include a file which had the <title> tag inside of it.

    Best wishes
     
    NoobieDoobieDo, Jun 29, 2006 IP
  3. Cheap SEO Services

    Cheap SEO Services <------DoFollow Backlinks

    Messages:
    16,664
    Likes Received:
    1,318
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If your header has <title> tags then take them out of the header and place them in each static page.
     
    Cheap SEO Services, Jun 29, 2006 IP
  4. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No. You would need to change your header file on the fly.

    Add a variable to your header file like <title><?php echo $title ?></title> and then define the title variable before you include the header file.
     
    mad4, Jun 29, 2006 IP
  5. terryuk

    terryuk Notable Member

    Messages:
    3,962
    Likes Received:
    319
    Best Answers:
    0
    Trophy Points:
    255
    #5
    Well there must be over 500 pages, so it'd be long :\
     
    terryuk, Jun 29, 2006 IP
  6. Cheap SEO Services

    Cheap SEO Services <------DoFollow Backlinks

    Messages:
    16,664
    Likes Received:
    1,318
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It may be painstaking but worth it in the long run.
     
    Cheap SEO Services, Jun 29, 2006 IP
  7. terryuk

    terryuk Notable Member

    Messages:
    3,962
    Likes Received:
    319
    Best Answers:
    0
    Trophy Points:
    255
    #7
    Yeh true, thanks for help
     
    terryuk, Jun 29, 2006 IP
  8. brian394

    brian394 Well-Known Member

    Messages:
    226
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    108
    #8
    Well it is possible using Javascript...

    
    <script type="text/javascript">
     document.title = 'new title';
    </script>
    
    Code (markup):
    But that would be horrible from an SEO perspective. As mad4 suggested above, your best bet would be to declare a $title variable before you include your header include file.
     
    brian394, Jul 1, 2006 IP
  9. terryuk

    terryuk Notable Member

    Messages:
    3,962
    Likes Received:
    319
    Best Answers:
    0
    Trophy Points:
    255
    #9
    Yeh, all done now. Thanks for the suggestion :D
     
    terryuk, Jul 1, 2006 IP