Meta tags!

This is a discussion on "Meta tags!" within the PHP Forum section. This forum, and the thread "Meta tags! are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jun 11th, 2008, 08:32
Junior Member
Join Date: May 2008
Location: Arbroath, Scotland
Age: 25
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Meta tags!

http://www.angus-properties.com/

I use an include for the header section, which means that my meta tags are fixed. If anyone has any bright ideas for dynamically generating description and keyword tags please post!

Im not sure it hurts my google ranking too much because I understand that google looks at a lot more than meta tags, but it must count for something! any help appreciated!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jun 11th, 2008, 08:52
Aso's Avatar
Aso Aso is offline
Moderator

SuperMember
Join Date: Oct 2007
Location: UK
Posts: 1,341
Blog Entries: 2
Thanks: 11
Thanked 49 Times in 46 Posts
Re: Meta tags!

In your header file, use something like;
PHP: Select all

<title><?php if( isset($page_title) ) echo $page_title;?></title>

<?php if( isset($page_description) ) echo '<meta name="description" content="' $page_description '" />';?>

<?php if( isset($page_keywords) ) echo '<meta name="keywords" content="' $page_keywords '" />';?>
Then in your main files, set the variables before you include the header file, for example;
PHP: Select all

<?php

$page_title 
'My title';
$page_description 'My description';
$page_keywords 'My keywords';

include 
'path/to/header.file';
?>
Last Blog Entry: The Google Misconception (Feb 3rd, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jun 11th, 2008, 16:30
unitedcraig's Avatar
SuperMember

SuperMember
Join Date: Oct 2007
Location: Stockport
Age: 17
Posts: 844
Blog Entries: 1
Thanks: 0
Thanked 1 Time in 1 Post
Re: Meta tags!

I agree with this, the best method for your meta tags.

What you might want to do, if you have pages in various sub directories of your site, is look at including a base url in your page

http://www.w3schools.com/TAGS/tag_base.asp
__________________
Last Blog Entry: A Royal Mistake (Feb 20th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Title Tags, Meta Tags and SEO - Keyword Density or Keyword Spamming? pctank Search Engine Optimization (SEO) 2 Jul 4th, 2008 11:52
Meta Tags Lchad Search Engine Optimization (SEO) 18 Feb 25th, 2008 07:07
the value of meta tags jenwrn Starting Out 5 May 9th, 2007 09:00
Meta Tags? daygon Web Page Design 3 Mar 24th, 2006 13:43
Need help with Meta tags EAndrews Web Page Design 10 Nov 2nd, 2005 22:23


All times are GMT. The time now is 02:18.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42