News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Meta tag NOT showing up!

Started by wynnyelle, May 03, 2010, 12:03:41 PM

Previous topic - Next topic

wynnyelle

http://warriorcatsrpg.com/index.php/topic,59898.new.html#new

This morning one of my members told me I have a totally different meta tag than the one I specifically wrote for the site and have on my global header. Which is this:

<meta name="description" content="Warriors Roleplaying Game based on the series by Erin Hunter.">

He says that he's finding this:

<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />

I don't want those keywords, we are SMF but our forum has nothing to do with those things.

Adish - (F.L.A.M.E.R)

<meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />

It seems that it is not done properly. I see the same thing.

You might want to recheck ?

wynnyelle

I have intalled global headers and footers and they display my table and affiliates fine. This is the same meta tag I had on my proboards site, where it worked fine. I've tried removing and reinstalling it several times.

Adish - (F.L.A.M.E.R)

Open your index.template.php of your theme, look for the line:

<meta name="keywords" content="

Edit the meta tags there.

wynnyelle

Thank you. But all I can find is this:

Quote<meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
   <meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '
   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />


That doesn't look like any normal meta. Where do I put mine in its place?

Adish - (F.L.A.M.E.R)

   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />

Change the PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum to what you want. (These are keywords used normally for searches)

the description is fine:
<meta name="description" content="Warrior Cats the RPG - Index" />


You can have your custom description by modifying the code <meta name="description" content="', $context['page_title'], '" />


wynnyelle

#6
Oh ok I didn't know if that content="', $context['page_title'],  ...stuff could just be wiped out and replaced with my own meta tag. I didn't want to break it.

...I'd like to get rid of the word index in the title too while I'm at it, would I also do that in this file? I just can't find where it's saying the actual title in there. I can go look again.

Edit: I am still stuck. I can't find where the title or actual description is though I did find and alter the keywords.

So before I do this I want to verify with you: I change this:

Quote
<meta name="description" content="', $context['page_title'], '" />

to this:

Quote
<meta name="description" content="Warriors Roleplaying Game based on the series by Erin Hunter.">

Adish - (F.L.A.M.E.R)

Personally, according to your posts here, I would edit it this way:

<meta name="description" content="', $context['page_title'], ' - Warriors Roleplaying Game based on the series by Erin Hunter." />

This is not tested, although it should work.

wynnyelle

Okay - I did it. It now seems to read something close to what I wanted. A lot better than before.

<meta name="description" content="Warrior Cats the RPG - Index - Warriors Roleplaying Game based on the series by Erin Hunter." />


I even looked up the title and the word Index and they appear nowhere in the file which is weird. The word index shows up but in a bunch of unrelated places.

Thanks Flamer! You helped me pretty much solve something I've been trying to do for almost a month :P

Adish - (F.L.A.M.E.R)

No problem, I'll mark this as solved.

The reason i kept the $context['page_title'] was because while the search engines go in your website, all the page titles will have the description you have set. So they will probably not find anything new on the website while they crawl and so they might just not put your site up for searches. (I am not a SEO guy, but that is what I think would happen)

wynnyelle

Yes I was thinking that that bit might be where the title of threads and stuff gets inserted, I like how each thread's own name and board's name is the title for that page. Makes you more varied in search engine results for whatever is talked about on your forum.

Thanks again Flamer!!!

Andrei Cantey

Shouldn't a package correct a problem like this guys?
Correct me if I am wrong please. Just assuming.
The worlds not perfect, thats what makes it damn Beautiful.
We are all Sinners








Adish - (F.L.A.M.E.R)

Quote from: Andrei2000PC on May 03, 2010, 03:42:23 PM
Shouldn't a package correct a problem like this guys?
Correct me if I am wrong please. Just assuming.

Its a easy peasy thing.. why make a extra space in the package manager and give users pain.. :P

wynnyelle

I don't see that it was a flaw or problem...just my lack of understanding of how to change it.

I guess if someone wanted to create a mod to make meta tags easy to just input they could...but I wouldn't say it's worth it personally :P

Advertisement: