WordPress Site Description

Someone asked me how I got the asterisks in my site description to be a link. It was actually really frustrating for about an hour. And then I remembered my filters.

This site is using Hybrid Core, so there are some extra hooks:


add_filter('option_blogdescription', 'halfelf_site_description');

function halfelf_site_description($desc) {
        $desc .= '<a href="http://halfelf.org/#bitch" title="Brave, Intelligent, Tenacious, Creative and Honest">*</a>';
        return $desc;
}

If you’re doing it on a non-Hybrid theme, you have to filter bloginfo

add_filter( 'bloginfo', 'halfelf_bloginfo', 10, 2 );
function halfelf_bloginfo( $text, $show ) {
    if( 'description' == $show ) {
        $text .= '<a href="http://halfelf.org/#bitch" title="Brave, Intelligent, Tenacious, Creative and Honest">*</a>';
    }
    return $text;
}

Pretty simple.

StudioPress Theme of the Month
Half-Elf? Try Half OFF WordPress ebooks!