Welcome to WebmasterWorld Guest from 54.242.231.210

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP and Metatags

How Should I go about this?

     
6:38 am on Jul 5, 2007 (gmt 0)

Junior Member

5+ Year Member

joined:Jan 28, 2007
posts:113
votes: 0


Hello,

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 July 5, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 15, 2004
posts:1867
votes: 0


Your questions related to your meta tags, I think you need to post them at the relevant forum.

Regarding this:

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.

Habtom

7:34 am on July 5, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:May 27, 2005
posts:614
votes: 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 July 5, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Nov 15, 2004
posts:1867
votes: 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 July 5, 2007 (gmt 0)

Administrator

WebmasterWorld Administrator jatar_k is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:July 24, 2001
posts:15755
votes: 0


as far as meta tags look at this one
[webmasterworld.com...]
4:33 am on July 9, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Oct 6, 2004
posts:131
votes: 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

<META TAGS>
include('header.inc.php');

Of course, you could always write your header file to generate meta-tags for you also.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members