How to edit phpBB3 SEO friendly
By Prokid
edit phpBB3 titlte tags and Meta tags
After installation of phpbb3 you will notice all your title tags and Meta tags doesn’t appear as you want.
First backup all your files before editing.
Below is how you will edit your title tags.
Go to your admin panel and choose Board setting
Under the board setting change the site name to what you will like all your pages titles to be called.
I will suggest not adding keywords in that section. I will explain below how to add your keywords
Now if you want to add keywords to your title only in your forum home pages so let says you want your title to be something like:
Example – example forum, topic, good example.
In your board settings change the site name to example.
Open the file ‘/language/en/common.php’ in your phpbb3 folder
Between line 275 and 276 you will see the line
‘INDEX’ => ‘Index page’,
Change it to the following line:
‘INDEX’ => ‘example forum, topic, good example,
If you view your forum you will see the title appear something like
Example dot example forum, topic, good example
To replace the dot with either - or | :-
Open the folder cache, open the file tpl_prosilver_overall_header.html
Between line 16 and 17 you will see the line
<title><?php echo (isset($this->_rootref['SITENAME'])) ? $this->_rootref['SITENAME'] : ''; ?> •
Replace that with the following line
<title><?php echo (isset($this->_rootref['SITENAME'])) ? $this->_rootref['SITENAME'] : ''; ?> - (dash)
If you don’t want keywords in your title leave the index blank like the one below
‘INDEX’ => ‘ ’,
Step 2
At default phpbb3 leaves all your forum titles to view forum and all your forum title will appear along with view forum.
So if your forum title was cars then it will appear something like view forum and then cars.
Below is how you will edit:
Open the file viewforum.php in the root of your phpbb3 forum
Between line 143 and 145 you will see the following line
page_header($user->lang['VIEW_FORUM'] . ' - ' . $forum_data['forum_name'], true, $forum_id);
Edit that line with the following line:
page_header($user->lang[' '] . ' ' . $forum_data['forum_name'], true, $forum_id);
The word viewforum will be removed from the page title so when users visit your forum they will only see your site name and the forum title.
Step 3
You will still notice in your forum all the topic appears to be viewtopic follow with your forum topic
To edit that do the following, this is similar to step2
Open the file viewtopic.php in the root of your phpbb3 forum
Between line 1756 and 1759 you will see the following
page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title'], true, $forum_id);
Edit that line with the following line :
page_header($user->lang[' '] . ' ' . $topic_data['topic_title'], true, $forum_id);
You will now notice that all your forum topic appear along with your site name instead of viewtopic followed by the topic of your forum.
Step 4
Only do step4 if you will like to add Meta description to only your forum home page
You will notice that if you add Meta description to your forum, it will appear in all your pages instead of appearing on only your home page.
Do the following to edit:-
Open the folder cache, open the file tpl_prosilver_overall_header.html
Between lines 13 you will see the following line
<meta name="description" content="" />
Add your forum description like
<meta name="description" content=" example forum is a forum for sharing" />
Save the file as
tpl_prosilver_overall_header1.html.php
Now open the folder cache again and open the file tpl_prosilver_index_body.html
Between lines 1 you will see the following line
<?php if (!defined('IN_PHPBB')) exit; $this->_tpl_include('overall_header.html'); ?>
Edit that line with the following line
<?php if (!defined('IN_PHPBB')) exit; $this->_tpl_include('overall_header1.html'); ?>
Now your forum home page should have a Meta description which will only appear in the forum home page.
In conclusion
Having the same Meta description and title tags in all your pages can affect your site so always make sure your site have a different title tags and Meta description in all pages.
Please if you any questions or issues let me know.
Linkhunger 6 days ago
Hello,
Thanks for sharing great tips, the first three steps is done perfectly but step 4 is not working,
I comment i cant add the example because no permission for adding html and php code,
Please give me your ID so i can discuss this issue, Please help me i need your help,