if, . , :
function LinkToPageOrHome( $script, $title ){
if ( strtolower( $_SERVER[ 'SCRIPT_NAME' ] ) == strtolower( $script) ){
$script = 'home.php';
$title = 'Home';
}
echo '<p><a href="' . $script. '">' . htmlentities( $title ) . '</a></p>';
}
This is a kind of dumb design approach, but you can use LinkToPageOrHome( 'page.php', 'My Page' );multiple templates and never worry about having a link to a page.
source
share