Killersites.com Homepage Welcome Guest  |  Register  |  Login
Login Name Password
  Search  
  Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help



Quick Go »

No member browsing this thread
Thread Status: Active
Total posts in this thread: 14
Posts: 14   Pages: 2   [ Previous Page | 1 2 ]
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2383 times and has 13 replies Next Thread
Female Thelma
Advanced Member
Member's Avatar

Texas, USA
Joined: Dec 8, 2003
Post Count: 3020
Status: Offline
Reply to this Post  Reply with Quote 
Re: PHP help with different title and meta tags for each page

I don't understand what the point of an include is, that is different for every page - why not just write it into every page?

Usually, includes are used for stuff that is the same on several pages -navigation, footer, header, - that way ONE file with the navigation is inserted in several pages, and any changes only need to be made in ONE file.

You will have one include for each page - what's the benefit of that?

You also have several errors in your code - the stylesheet link belongs in your head section, not the body, you're using (correctly) HTML doctype (ideally, so, use strict) but, incorrectly, xhtml closing tags ( <br / >, deprecated tags (<font> <center>) and <p>tags are paragraph tags and meant to surround each paragraph - no <br>tags needed inside. And you have several lists that aren't written as lists, but with the <br> tags.
----------------------------------------
...
[Oct 17, 2007 4:52:41 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.aandbwebdesign.com [Link] Report threatening or abusive post: please login first  Go to top 
Female lm
Advanced Member
Member's Avatar


Joined: Oct 27, 2004
Post Count: 2550
Status: Offline
Reply to this Post  Reply with Quote 
Re: PHP help with different title and meta tags for each page

If the page in a "static" meaning doesnt exist and the pages have different content, loaded from db, and if somebody still want to SEO - optimize them to have different titles or authors, then it could be ( or better be) done - assign to each page own meta tags.
----------------------------------------

My blog

----------------------------------------
[Edit 1 times, last edit by lm at Oct 17, 2007 7:18:47 AM]
[Oct 17, 2007 7:10:01 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest    http://www.technotext.nl/ [Link] Report threatening or abusive post: please login first  Go to top 
Male theavis
Stranger




Joined: Oct 16, 2007
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: PHP help with different title and meta tags for each page

Thanks for the input from everyone. I appreciate all the help. I am going to work through the code to clean it up and then I will get back with any questions or my solution.
[Oct 17, 2007 7:22:28 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male krillz
Newbie




Joined: Aug 16, 2007
Post Count: 42
Status: Offline
Reply to this Post  Reply with Quote 
Re: PHP help with different title and meta tags for each page

well you have to options, the one used during the dark ages and the one used now.

The first one is basically going back to the stone age, hard coding it which kind of sucks.

The second one would be making the tile become dynamic, adapting after it's content like:

The title of the post/article/page | SiteName

Of course the | symbol can be changed to whatever you like.
I guess you get the content from a database, now I do not know exactly how you store it or what you store to be displayed.

But if you have a table for storing the post/article/page, then simply have the title for it be displayed also in the title. Or you could adopt a new table with costum titles to be displayed, link it with the table holding the post and display.

<title><?php echo $row['title'].' '; ?> | SiteName </title>

or if you do the costum thing you could create your own little function that you call inside the title tag.

<title><?php myCostumTitle($row['post_id']) ?> | SiteName </title>


of course in my example I stored the query results in an array called $row, so you need modification. But you should get the picture now.
[Oct 18, 2007 5:50:38 PM] Show Printable Version of Post    View Member Profile    Send Private Message    http://krillz.com [Link] Report threatening or abusive post: please login first  Go to top 
Posts: 14   Pages: 2   [ Previous Page | 1 2 ]
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread