Adding keywords to your BANS site title
February 11, 2008 – 7:40 pmA fairly well known SEO technique is to have a good title for each of your pages. Another common tactic is to put keywords in your title as well. Given this, if you have a BANS site, it can be beneficial to automatically add in your page’s keywords to your page title. This is pretty easy to do if you don’t mind editing PHP code.
NOTE: First make sure you backup any files before trying this!
Step One
Open your FrontControl.php file and around line 106 there will be a function called meta. This is where, appropriately enough, the meta section of the HTML page is created.
Step Two
The first part of this section you will see where the title is output. It will look something like:
$f = "<title>".$this->getPageArea("title",$checkFile,"id")."</title>";
Change this to:
$f = "<title>".$this->getPageArea("title",$checkFile,"id")." ".
$this->getPageArea("keywords",$checkFile,"id")."</title>";
But it needs to be on one line. I had to put it on two lines to get it to fit.
Step Three
Now scroll down to about line 182 or so and you will see the follow:
$f .= "</title>";
Right before that, add this line:
$f .= $this->keywords;
That should append the keywords that you specify in your admin section to the title for that particular page. If you have any problems, let me know.









One Response to “Adding keywords to your BANS site title”
Thanks for the tips, worked well
By Jerry on Apr 10, 2008