Published in: PHP
My wordpress theme uses the site name in the header (top) and i needed to split it in half , in order to style it correctly in css
<? if( isset($_SERVER['HTTP_HOST']) && preg_match("/([^\.]+)\.(com|net|org|info|mobi|biz|ca|us|tv|cc|eu|be|de|jp|nl|ws|fi)/", $_SERVER['HTTP_HOST'], $matches) ){ echo "<h1><a href=\"<?php bloginfo('url'); ?>\">$first_half<span class=\"subdomain\">$second_half</span></a></h1>"; } ?>
You need to login to post a comment.
