How to enable meta Description tag in Drupal 6
One of the nice things about Drupal is that it doesn't have those unecessary keyword and description meta tags bloating up the database and user interface. I installed an early version of MODx and found that each content item has a form field for both meta description and meta keywords. This means I have to explain to my clients why they don't need to fill those in. Don't they know that Meta tags are dead?
Anyway, you might like to use the description meta tag at least which still has support.
Drupal 6 has a string overrides function that you can adapt for this which you can find in the settings.php file:
"String overrides:
To override specific strings on your site with or without enabling locale module, add an entry to this list. This functionality allows you to change a small number of your site's default English language interface strings."
Now all you need to do is utilise one of the variables that you may not be using in the themes. I have used the "Mission statement" which I altered to "Meta Description" like this:
$conf['locale_custom_strings_en'] = array(
'Mission statement' => 'Meta Description',
'Mission' => 'Meta Description',
);
In your theme settings make sure you have the Meta Description (formerly mission statement) checkbox enabled. See admin > build > themes > settings > garland.
In your page.tpl.php file add this line in the head of the html page:
<meta name="description" content="<?php print $mission ?>" />
In Site Information fill out the Meta Description box. See: admin > settings > site-information.
And then you're done!
New forum topics
- Sydney web developer wanted
- WANTED Web Developer / Designer- unique and exciting project in Perth (The birth of a new brand)
- Outsource programming work to my people India - great rates, reliable work.
- Looking for part-time Web development jobs in Melbourne
- PHP programmer available for contract and freelance work.
- A Small Easy Project For Programmer
- PHP, MySQL, Apache, Linux (LAMP) Developer Available (Sydney West)
- Selenium - Testing IDE for Firefox
- FWD Freelancers Listing
- Australian Drupal Developers
- Seeking Ruby on Rails developers - blue chip client; great rates
- Drupal Australia IRC
- Melbourne/Adelaide based developer required
- Looking to keep a couple of my team members busy
- Interested in working for equity rather than cash?

Post new comment