I thought I'd share one SEO trick we use on our search.php page in Wordpress. You have to understand that we store searches and put top 10 most searched items in the footer.php for search engines to find them, as well we have a longtail page where all searches are stores and the url's + keyword visible for users+engines. Now we edit the searchpage to show 100 results and edit the file like below. The objectives are: Maximize longtail SERPS to be found Have a significant amount of keywords on one page Help users find what they want (yahoo keywords replacement) Help users find what there looking for faster. This is a little thank you to DP forum users that helped me for the last 4 years in sales and with there great knowledge of SEO. <?php include 'header.php'; ?> <?php error_reporting(0); /**/ /* */ function spelling_suggest($query, $url_format='/?s=%s', $pre_suggest_text=', we suggest the following alternative: <strong>', $post_suggest_text='</strong>', $no_suggest_text='', $error_text='') { $request = 'http://api.search.yahoo.com/WebSearchService/V1/spellingSuggestion?appid=spelling_suggest&query='.urlencode($query).'&output=php'; $response = file_get_contents($request); if ($response === false) { echo $error_text; return false; } $phpobj = unserialize($response); if(isset($phpobj['ResultSet']['Result']) && $phpobj['ResultSet']['Result']!="") { echo $pre_suggest_text; echo '<a href="'; printf($url_format,urlencode($phpobj['ResultSet']['Result'])); echo '" title="Search the whole site for: '.htmlspecialchars($phpobj['ResultSet']['Result']).'">'.htmlspecialchars($phpobj['ResultSet']['Result']).'</a>'; echo $post_suggest_text; } else { echo $no_suggest_text; } return true; } ?> <div class="body home"> <div class="left"> <div class="leftPad"> <?php if (have_posts()) : ?> <h2 class="pagetitle">Search Results for <?=strip_tags(strip_tags($_GET['s']))?></h2> We found for your search "<strong><?=strip_tags(strip_tags($_GET['s']))?></strong>" the following results:<br /> <br /> <?php while (have_posts()) : the_post(); ?> <div class="item"> <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3><small>Published on <?php the_time('l, F jS, Y') ?> and postive match for words "<strong><?=strip_tags(strip_tags($_GET['s']))?></strong>"</small> <?php the_excerpt(); ?><p align="right"><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?> match for <?=strip_tags(strip_tags($_GET['s']))?>">Read <?php the_title_attribute(); ?></a></p><br /> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2>Search Results for <?=strip_tags($_GET['s'])?></h2> We could not find anything for your "<strong><?=strip_tags(strip_tags($_GET['s']))?></strong>" <?php spelling_suggest($s); ?>. <p>If you feel you did not mispelled "<strong><?=strip_tags(strip_tags($_GET['s']))?></strong>", then we apologize for not offering you a search result. Please <a href="/contact/" href="Contactpage">contact</a> us to suggest and give information on articles on "<strong><?=strip_tags(strip_tags($_GET['s']))?></strong>" so we can make our site a more complete one.</p> <?php endif; ?> </div> </div> </div> <?php include 'footer.php'; ?> PHP:
Sound tip, nicely done. Thanks for the code snip. Do you have an example of this in action by chance? thanks, Nigel
Sorry I have some sites that run this, but cannot show you. There client site and since I also sell links etc on ths forum, better not to give them out in the open. But its a nice way to al least store earches that people do on the site (we also store keywords from SE as if they were searches on our sites) that way we create some conten for long tail. Combine that with plugins that collect onsite search and you have created some interesting content (searchresults pag with no results