WordPress Search & Permalinks

Posted by Paul Farrow - Under: Software

Using the carrington theme and after switching to permalinks I noticed that the wordpress search doesnt seem to work.  Not sure if this is by design or what.  After a little bit of scrabbling around I decided to hack the scripts so I changed the search.php script which sits in themes/carrington-blog/forms.  I commented out the permalinks section of the if like so

/*
if (get_option('permalink_structure') != '') {
    $onsubmit = "location.href=this.action+
'search/'+encodeURIComponent(this.s.value).replace(/%20/g, '+'); return false;";
}
else {
    */
    $onsubmit = '';
//}

so that it always does the non permalink bit whether or not it is selected.  Seems to work still, all comments welcomed on this.

Tags: , ,