Page 1 of 2

[Solved] Can I add new meta lines in overall_header.php

Posted: 28 Oct 2011, 18:40
by master412160
When I view source of index:

<meta name="keywords" content="" />
<meta name="description" content="" />

that display, so I was thinking onl for viewtopic and viewforum the meta tags are used.

So is it possible for me to add under the two meta's the same meta's again but fill them up.

Can I add new meta lines in overall_header.php

Posted: 28 Oct 2011, 18:51
by Stoker
Forum SEO only covers viewforum.php and is displayed when viewing a forum.

Can I add new meta lines in overall_header.php

Posted: 28 Oct 2011, 18:59
by master412160
I know that very well. But my question is can I just add the meta tag for keywords and description twice in the overall_header.php

Without causing the seo mod not to work, so the meta is useless due being used twice.

So it would look like this:

Code: Select all

<meta name="keywords" content="<!-- IF SCRIPT_NAME == "viewforum" -->{FORUM_SEO_KEY}<!-- ELSEIF SEO_KEY -->{SEO_KEY}<!-- ENDIF -->" />
<meta name="description" content="<!-- IF SCRIPT_NAME == "viewforum" -->{FORUM_SEO_DESC}<!-- ELSEIF SEO_DESC -->{SEO_DESC}<!-- ENDIF -->" />
<meta name="keywords" content="keyword 1, kewyrod 2," />
<meta name="description" content="This is a description for the index." />

Can I add new meta lines in overall_header.php

Posted: 30 Oct 2011, 23:23
by master412160
I was hoping to have got a reply by now?

Can I add new meta lines in overall_header.php

Posted: 31 Oct 2011, 07:50
by Stoker
Close. You have to wrap the second instance with: <!-- IF SCRIPT_NAME == "index" --> to make sure its only displayed on index.

Can I add new meta lines in overall_header.php

Posted: 31 Oct 2011, 10:04
by master412160
Alright.
<!-- IF SCRIPT_NAME == "index" -->
<meta name="keywords" content="keyword 1, kewyrod 2," />
<meta name="description" content="This is a description for the index." />
<! ENDIF -->

like that?

Can I add new meta lines in overall_header.php

Posted: 31 Oct 2011, 10:19
by Stoker
exactly :thumb:

Can I add new meta lines in overall_header.php

Posted: 31 Oct 2011, 12:22
by master412160
Alright now I tried to put that code on some places now, but it doesn't work.

Were to put it?

Can I add new meta lines in overall_header.php

Posted: 31 Oct 2011, 14:29
by Stoker

Can I add new meta lines in overall_header.php

Posted: 31 Oct 2011, 14:31
by master412160
I tried this and it didn't work:

<meta name="keywords" content="<!-- IF SCRIPT_NAME == "viewforum" -->{FORUM_SEO_KEY}<!-- ELSEIF SEO_KEY -->{SEO_KEY}<!-- ENDIF -->" />
<meta name="description" content="<!-- IF SCRIPT_NAME == "viewforum" -->{FORUM_SEO_DESC}<!-- ELSEIF SEO_DESC -->{SEO_DESC}<!-- ENDIF -->" />
<!-- IF SCRIPT_NAME == "index" -->
<meta name="keywords" content="keyword 1, kewyrod 2," />
<meta name="description" content="This is a description for the index." />
<! ENDIF -->