1. Home »
  2. Tech

Add SEO Breadcrumbs to phpBB

phpBB

Search engine optimization may be a challenge especially when editing web cms files to follow standard guidelines. phpBB is a very good open source forum board content management system but its default template is not search engine optimized.

The updated Google SEO breadcrumbs 13 august 2015 shows how to implement MICRODATA in your website’s source code to tell the search engine the position of a certain page in your site hierarchy. The default prosilver theme for phpBB already implemented breadcrumbs but these breadcrumbs are not search engine optimized. All you need to do is to follow Google webmaster guidelines to add MICRODATA to your phpBB breadcrumbs code.

phpBB breadcrumbs code in the default theme is located in a file called navbar_header.html and it is located root phpBB directory/styles/prosilver/template. open the file and search for the following code:

<!-- DEFINE $MICRODATA = ' itemtype="http://data-vocabulary.org/Breadcrumb" itemscope=""' -->
		<!-- EVENT overall_header_breadcrumbs_before -->
		<li class="small-icon icon-home breadcrumbs">
			<!-- IF U_SITE_HOME --><span class="crumb"{$MICRODATA}><a href="{U_SITE_HOME}" data-navbar-reference="home" itemprop="url"><span itemprop="title">{L_SITE_HOME}</span></a></span><!-- ENDIF -->
			<!-- EVENT overall_header_breadcrumb_prepend -->
			<span class="crumb"{$MICRODATA}><a href="{U_INDEX}" accesskey="h" data-navbar-reference="index" itemprop="url"><span itemprop="title">{L_INDEX}</span></a></span>
			<!-- BEGIN navlinks -->
				<!-- EVENT overall_header_navlink_prepend -->
				<span class="crumb"{$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{navlinks.U_VIEW_FORUM}" itemprop="url"><span itemprop="title">{navlinks.FORUM_NAME}</span></a></span>
				<!-- EVENT overall_header_navlink_append -->
			<!-- END navlinks -->
			<!-- EVENT overall_header_breadcrumb_append -->
		</li>
		<!-- EVENT overall_header_breadcrumbs_after -->

Change it with the following optimized code to add MICRODATA to your phpBB breadcrumbs:

<!-- DEFINE $MICRODATA = ' itemscope itemtype="http://schema.org/ListItem"' -->
<li class="small-icon icon-home breadcrumbs">
        <ol itemscope itemtype="http://schema.org/BreadcrumbList">
		<!-- IF U_SITE_HOME --><li class="crumb" itemprop="itemListElement"{$MICRODATA}><a itemprop="item" href="{U_SITE_HOME}" data-navbar-reference="home"><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="1" /></li><!-- ENDIF -->
			<li class="crumb" itemprop="itemListElement"{$MICRODATA}> &raquo; <a itemprop="item" href="{U_INDEX}" accesskey="h" data-navbar-reference="index"><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="2" /></li>
			<!-- BEGIN navlinks(0,0) -->
				<li class="crumb" itemprop="itemListElement"{$MICRODATA}> &raquo; <a itemprop="item" href="{navlinks.U_VIEW_FORUM}"<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><span itemprop="name">{navlinks.FORUM_NAME}</span></a><meta itemprop="position" content="3" /></li>
			<!-- END navlinks -->
            <!-- BEGIN navlinks(1,1) -->
            <li class="crumb" itemprop="itemListElement"{$MICRODATA}> &raquo; <a itemprop="item" href="{navlinks.U_VIEW_FORUM}"<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><span itemprop="name">{navlinks.FORUM_NAME}</span></a><meta itemprop="position" content="4" /></li>
            <!-- END navlinks -->
            </ol>
		</li>

This will optimize your MICRODATA in the thread level, forums and sub-forums with the meta position tag.