Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: title and meta tags robots, language for SEO  (Read 5318 times)

Elvino

  • Newbie
  • *
  • Karma: 0
  • Posts: 44
    • http://www.elvino.it/
title and meta tags robots, language for SEO
« on: October 11, 2006, 10:54:44 PM »

Hello,
for SEO it would be better than the title it of the page it was before the title of the site.  how to make?

in the function title() I have added the meta tags robots and language:

on #SITE LANGUAGE VARIABLES
Code: [Select]
$l['robots'] = 'index, follow'; // noindex, nofollow
$l['language'] = 'italian'; // english, italian, ecc
all title code:
Code: [Select]
// TITLE
function title() {
$categorySEF = get_id('category'); $articleSEF = get_id('article');
$categoryName = retrieve('name', 'categories', 'seftitle', $categorySEF);
$articleTitle = retrieve('title', 'articles', 'seftitle', $articleSEF);
$title = s('website_title');
if (!empty($categoryName)) {$title .= ' '.l('divider').' '.$categoryName;}
if (!empty($articleTitle)) {$title .= ' '.l('divider').' '.$articleTitle;}
echo ''.$title.''."\n";
if (!empty($articleSEF)) {
$query = "SELECT * FROM ".db(prefix)."articles WHERE seftitle = '$articleSEF'";
$result = mysql_query($query);
while ($r = mysql_fetch_array($result)) {$dmeta = $r['description_meta']; $kmeta = $r['keywords_meta'];} }
echo ''."\n";
echo ''."\n";
echo ''."\n";
echo ''."\n";
echo ''."\n";
echo '';
if (isset($_SESSION[db('website').'Logged_In'])) {js();}
}

qxygene

  • Newbie
  • *
  • Karma: 0
  • Posts: 9
    • http://www.infomarmaris.com
title and meta tags robots, language for SEO
« Reply #1 on: January 10, 2007, 11:52:12 PM »

this is a good mood.. thanks.. anyway do you have any idea how to make different keywords and description meta tags for each categories? only site defaults are coming for each categories.

vix

  • Newbie
  • *
  • Karma: 1
  • Posts: 22
title and meta tags robots, language for SEO
« Reply #2 on: February 01, 2007, 03:32:12 PM »

I am having exactly the same question.

I need to put different meta tag description for each article page, but it seems only the defaults come up in every page..
Logged

witit

  • Newbie
  • *
  • Karma: 1
  • Posts: 18
title and meta tags robots, language for SEO
« Reply #3 on: February 18, 2007, 02:22:02 AM »

The meta description and keywords appear twice, first for the article and then the default for the site. Is there a way to show only the ones for the article?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
title and meta tags robots, language for SEO
« Reply #4 on: February 18, 2007, 02:38:28 AM »

Sure. Click the "Site Settings" or "Settings" link from the main admin panel (bottom) and expand the Site Settings panel... empty out the Description and Keywords META fields... and save your settings. Then... always make sure you fill these fields in each time you do an article or page.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

brauck

  • Hero Member
  • *****
  • Karma: 18
  • Posts: 556
    • http://www.hbw-webdesign.nl/
title and meta tags robots, language for SEO
« Reply #5 on: February 18, 2007, 12:32:21 PM »

Quote from: witit
The meta description and keywords appear twice, first for the article and then the default for the site. Is there a way to show only the ones for the article?
Do you have these meta-tags also in your index.php? because sNews generates these tags only once AFAIK.

So if you do, just remove these tags from your index.php and you will be fine.
Logged
Confidence is reduced complexity.
brauck.nl for free css templates

witit

  • Newbie
  • *
  • Karma: 1
  • Posts: 18
title and meta tags robots, language for SEO
« Reply #6 on: February 18, 2007, 04:04:28 PM »

You are right brauck. I actually had the tags in my index.php file. That was the cause of my problem. It's fixed now. Thank you.
Logged