Remove Index from SMF forum Title

SMF (Simple Machines Forum) is widely used open source forum script.

WHMCS Complete Billing and Support

By default SMF forum use following as title:

YOUR FORUM NAME – Index

Remove Index from Title

Remove Index from SMF Forum Title

If you do not wish to keep “Index” in your forum title, you will need to edit your index.template.php file present in your theme directory. Following are the exact steps to get rid of “Index” from the forum title:

[1] First secure the backup of your index.template.php file present in your theme directory (SMF_Installation_Directory/Themes/YOUR_THEME/)

[2] Now open index.template.php file to edit it and search for the following code:

echo ‘
<meta http-equiv=”Content-Type” content=”text/html; charset=’, $context[‘character_set’], ‘” />
<meta name=”description” content=”‘, $context[‘page_title_html_safe’], ‘” />’, !empty($context[‘meta_keywords’]) ? ‘
<meta name=”keywords” content=”‘ . $context[‘meta_keywords’] . ‘” />’ : ”, ‘
<title>’, $context[‘page_title_html_safe’], ‘</title>’;

[3] Replace the above code with following:

if ($context[‘page_title_html_safe’] == ‘YOUR FORUM TITLE – Index’)
{
echo ‘
<title>YOUR FORUM TITLE</title>
<meta name=”description” content=”PUT YOUR META DESCRIPTION”/>
<meta name=”keywords” content=”PUT YOUR META KEYWORDS “/>’;
}
else
{
echo ‘
<meta http-equiv=”Content-Type” content=”text/html; charset=’, $context[‘character_set’], ‘” />
<meta name=”description” content=”‘, $context[‘page_title_html_safe’], ‘” />’, !empty($context[‘meta_keywords’]) ? ‘
<meta name=”keywords” content=”‘ . $context[‘meta_keywords’] . ‘” />’ : ”, ‘
<title>’, $context[‘page_title_html_safe’], ‘</title>’;
}

[4] Save index.template.php file.

That’s it!

Posted in SMF.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *