Wednesday, November 18, 2009

CJ Niche Store Wordpress Plugin Search Results Template Mod


While browsing the PHPBay forum, I came across an interesting mod you can make while using the CJ Niche Store Wordpress Plugin to your Search Results page (search.php) in your Wordpress template to show items from Commission Junction based on search terms a surfer uses. The code below will go in place of everything between the <div class="postarea"> and closing </div> tag. It will of course differ from template to template that are using with Wordpress, but the main code piece is below.



Here's <? echo $_GET["s"]?> for sale at YOUR STORE NAME HERE.
<p>
<?php
function cjnichesearch($term) {
$keywords = $term;
$text .= '[cjniche keywords="'.$keywords.'" listing="10"]';
echo do_shortcode($text);
}
cjnichesearch($_GET["s"]);
?></p>

Related Posts by Categories



0 comments:

Followers

Twitter Updates

    follow me on Twitter
     

    Build A Niche Store Blog. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted by Bloganol dot com Privacy Policy