|PHP and Metatags|
How Should I go about this?
| 6:38 am on Jul 5, 2007 (gmt 0)|
For my site I include header.php on every page which as the meta tag in it, which of course makes it hard for me to change the meta tag for every page, So I have some questions:
1. Are they really necessary these days?
2. What would be the best way to get different meta tags on each page.
3. Will my PR get punished for having the same keywords on every page in the meta tags?
In regards to question 2, the only thing I've been able to think of currently is using a database for extracting the meta tags but I'm pretty sure that wont work how I have my site set up now since I'm mainly just using different PHP files.
Finally, I have a section where people make profiles, and they're profile link would be /profile.php?user=username, so if I make another column called keywords I could just use $req_user_info['keywords'] within the meta tag for those pages?
Thanks for any help :)
| 7:06 am on Jul 5, 2007 (gmt 0)|
Your questions related to your meta tags, I think you need to post them at the relevant forum.
|For my site I include header.php on every page which as the meta tag in it, which of course makes it hard for me to change the meta tag for every page |
There are a number of ways you can keep it simple. Your specific file structure could be different, but you can do the following.
You mentioned you have a number of dynamic files. When you include the header, you can pass a value, in which case inside your header.php, you can either query the meta tags from the database, or from an array where you can read the info from.
If you provide more details, will get back to you with a response.
| 7:34 am on Jul 5, 2007 (gmt 0)|
I generate description metatags from the title of the post. Keyword metatags come from the first 250 charactors in the post.
All dynamically generated with php.
If you write your thread with the tags in mind it works well.
| 7:54 am on Jul 5, 2007 (gmt 0)|
|I generate description metatags from the title of the post. Keyword metatags come from the first 250 charactors in the post. |
I think a bit of less control, but less headace and time wasted generating keywords.
I like the idea.
| 1:16 pm on Jul 5, 2007 (gmt 0)|
as far as meta tags look at this one
| 4:33 am on Jul 9, 2007 (gmt 0)|
I think meta-tags are important.
You can easily put meta-tags on each page, and then revise your header.inc.php file to just have the html content of the header only.
So you'd would have code like this
Of course, you could always write your header file to generate meta-tags for you also.