SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Creating Dynamic Title tags on 1 header file

    When making a website I use a mixture of Xhtml and simple PHP programming.

    Having 1 header file is very common now a days on large sites. Using the same metatags for everypage will be considered as spamming.

    First thing is to insert the Variable in the title tag open up your header file and insert

    <title><?$title?></title>
    Now open up the file you call the header from and insert the variable before the include.

    <?php
    $title='Page Title - Sitename';
    include("header . php");?>
    This can be done for keywords and decription as well.

    Enjoy
    >> CreativHOST - Shared Hosting
    >> USA/UK/EU - Virtual Private Servers | Dedicated Servers
    >> Contact us today - sales@creativhost.com

  2. #2
    SitePoint Zealot Steveiwonder's Avatar
    Join Date
    Nov 2008
    Posts
    151
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks, i guess!?

  3. #3
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    13
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well i did just get asked the questions so I posted for someone
    >> CreativHOST - Shared Hosting
    >> USA/UK/EU - Virtual Private Servers | Dedicated Servers
    >> Contact us today - sales@creativhost.com

  4. #4
    We're from teh basements.
    Join Date
    Apr 2007
    Posts
    1,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's customary to answer the question in the same thread the question was posted in.

  5. #5
    SitePoint Enthusiast futureking's Avatar
    Join Date
    Mar 2009
    Location
    Bilaspur, Chhattisgarh, INDIA
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CreativHost View Post
    When making a website I use a mixture of Xhtml and simple PHP programming.

    Having 1 header file is very common now a days on large sites. Using the same metatags for everypage will be considered as spamming.

    First thing is to insert the Variable in the title tag open up your header file and insert



    Now open up the file you call the header from and insert the variable before the include.



    This can be done for keywords and decription as well.

    Enjoy
    Thanks
    Freelance PHP Developer

    Portfolio Link http://abhinavsoftware.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •