[bbDev] template-functions.php search_form( $q = '') does not check for my-templates/search-form.php

0 1 primate.code at gmail.com
Wed Sep 20 23:43:24 GMT 2006


Trying to help out where I can...

The search_form function in template-functions.php did not check to
see if ther was a search-form.php in my-templates/.  Using the exiting
my-template checks format I modified my own copy as follows:

Thanks


/*
function search_form( $q = '' ) {
	require( BBPATH . '/bb-templates/search-form.php');
}
*/

function search_form( $q = '' ) {
	if( file_exists( BBPATH . 'my-templates/search-form.php' ) ){
		include( BBPATH . 'my-templates/search-form.php' );		
	} else {
		include( BBPATH . '/bb-templates/search-form.php');
    }
}


More information about the bbDev mailing list