Revision [20555]

This is an old revision of SEOHacks made by BrianKoontz on 2009-04-18 00:07:29.

 

SEO Hacks

I use a customized Wikka engine for my company's website. I've been teaching myself the finer points of SEO (search engine optimization), and have modified the code my site runs under to support various SEO initiatives I'm working on to increase the visibility of my company website in the major search engines. I'm tackling Google first, and discovered an excellent resource that outlines several SEO strategies. I'm sharing these ideas with the Wikka community to further demonstrate the flexibility of WikkaWiki. Please feel free to contribute your own SEO hacks on this page!

Note: All code below has been tested and implemented on trunk (unstable) versions of Wikka, in a rather WikiInAVacuum heavily modified environment. These examples may or may not work on production versions of Wikka "as is," and might require additional modifications. The code as posted is working code on my website. These examples are not secure enough to be made available to users you do not explicitly trust. All examples are proof-of-concept and are not intended for use on production sites!
 


title action

One of the recommendations made by Google in their SEO guide is to customize the title of each page, using relevant keywords. Wikka currently does not support per-page title capabilities. This action, along with a minor modification in templates/header.php, permits the display of a customized title for each page. Note that making these modifications disables site-wide titles, so pages without explicit titles set will not contain title tags.

templates/header.php
Locate and comment out the following line (shown as commented out here):
    /* <title><?php echo $doctitle; ?></title> */


Create the following new action directory/file:
actions/title/title.php
<?php
$string = $vars['string'];
$this->AddCustomHeader("<title>".$string."</title>");
?>


Usage
{{title string="My page title with important keywords"}}


meta action


Display of search term frequencies in the referrers handler page

Valid XHTML :: Valid CSS: :: Powered by WikkaWiki