Advertisement:

How to add Current Page Title to Meta Keywords in SMF

Aloittaja Don Jajo, lokakuu 05, 2013, 01:12:41 IP

« edellinen - seuraava »

Don Jajo

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! :'(

Arantor

How does this help SEO when search engines are well known for not using meta keywords?
Holder of controversial views, all of which my own.



Arantor

Um, Google has said numerous times that they do not consider meta keywords for ranking purposes.
Holder of controversial views, all of which my own.


Don Jajo

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

Arantor

Not the meta keywords they don't. They use meta description and the page content.
Holder of controversial views, all of which my own.



Arantor

And you quoted my post because?

You're changing the meta KEYWORDS. Not the DESCRIPTION.
Holder of controversial views, all of which my own.



Kindred

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.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

(the latter of which is what SMF already does... go figure)
Holder of controversial views, all of which my own.


Advertisement: