Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: Don Jajo - lokakuu 05, 2013, 01:12:41 IP

Otsikko: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Don Jajo - lokakuu 05, 2013, 01:12:41 IP
Hi all,

As part of Seo, I saw this in vBulletin Forum Software and it looks nice and helps in SEO.

How this is done in SMF
Goto your current theme directory and edit your index.template.php

Find this:
var ajax_notification_cancel_text = "', $txt['modify_cancel'], '";
// ]]></script>';


Just below it paste this:
$arraytitle = explode(' ',$context['page_title_html_safe']);
$arraytitle2 = implode(', ',$arraytitle);


Then find this:
<meta name="keywords" content="' . $context['meta_keywords'] . '" />

Replace with:
<meta name="keywords" content="' . $arraytitle2.','.$context['meta_keywords'] . '" />

Now assuming a current topic page title is Welcome to SMF, they keywords will be Welcome, to, SMF, (...other keywords you added in admin mode)

Hope it helps! :)

I DON'T KNOW HOW TO CREATE MODS! :'(
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Arantor - lokakuu 05, 2013, 01:13:58 IP
How does this help SEO when search engines are well known for not using meta keywords?
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Don Jajo - lokakuu 05, 2013, 02:04:38 IP
Lainaus käyttäjältä: Arantor - lokakuu 05, 2013, 01:13:58 IP
How does this help SEO when search engines are well known for not using meta keywords?
Google uses it, am sure of that
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Arantor - lokakuu 05, 2013, 02:10:40 IP
Um, Google has said numerous times that they do not consider meta keywords for ranking purposes.
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Don Jajo - lokakuu 05, 2013, 02:37:59 IP
Lainaus käyttäjältä: Arantor - lokakuu 05, 2013, 02:10:40 IP
Um, Google has said numerous times that they do not consider meta keywords for ranking purposes.
they use it to display link in search when search keyword and your site keyword matches and also they use keyword to display relevant ads in adsense
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Arantor - lokakuu 05, 2013, 02:39:17 IP
Not the meta keywords they don't. They use meta description and the page content.
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Don Jajo - lokakuu 05, 2013, 03:30:39 IP
Lainaus käyttäjältä: Arantor - lokakuu 05, 2013, 02:39:17 IP
Not the meta keywords they don't. They use meta description and the page content.
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Arantor - lokakuu 05, 2013, 03:35:39 IP
And you quoted my post because?

You're changing the meta KEYWORDS. Not the DESCRIPTION.
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: kat - lokakuu 05, 2013, 03:56:57 IP
This, from Google, themselves:

Google does not use the keywords meta tag in web ranking (http://www.youtube.com/watch?feature=player_embedded&v=jK7IPbnmvVU)
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Kindred - lokakuu 08, 2013, 12:37:29 IP
Additionally, shoving words like "to" in the keywords would be useless -- even if google DID use them (which is does not, as already stated)
Having your title words (especially for posts by users who make stupid titles) in the keywords actually CHEAPENS the use of keywords on your site.
(and that sort of crap is why google doesn't even use them any more)



Also, duplicating the page TITLE tag in the DESCRIPTION also seems like a waste of time.
Otsikko: Re: How to add Current Page Title to Meta Keywords in SMF
Kirjoitti: Arantor - lokakuu 08, 2013, 12:38:34 IP
(the latter of which is what SMF already does... go figure)