A simple URL builder function for WordPress. Codex reference: http://codex.wordpress.org/Function_Reference/site_url
<?php
/**
* Site URL Builder
* Usage: <?php bsd_url( 'page-slug', 'http' ); ?>
*/
function bsd_url( $slug, $protocol ) {
$url = site_url( '/' . $slug . '/', $protocol );
echo $url;
}
?>