Categories: Tips & Tricks

Add a shortcode

This is a simple one.

/**
 * Your Blog title
 *
 */function my_blog_title() {
 $blogname = get_bloginfo('name');
    return '<span class="blog-title">' . $blogname . '</span>';
}     
add_shortcode('blog-title', 'my_blog_title');

Just add this to your functions.php file and then add [blog-title] in any post or page and it will return your Blog Title. :)

Web Master

Hi, I am Miguel, I bought this site in 2009. So I now run or manage the site. Please visit my new website or follow me on twitter @W3i.

Recent Posts

WPZoom: 20 WordPress Rockstars

I was just cruising the web when I can across this post. Thanks to WPZoom…

4 hours ago

On the lookout for 2.7

I know the whole community is weary and waiting for the release of the now…

8 hours ago

Scheduled Post Shift

I just came across an article over at WPHacks.com about a "how to" shift and…

20 hours ago

WP Realtor

The Ultimate WordPress Real Estate theme with custom developed plugins, single and multiple agents, extensive…

1 day ago

WordPress 2.6.5

WordPress 2.6.5 is immediately available and fixes one security problem and three bugs. We recommend…

2 days ago

Comment Validation

Another plugin I am using on this site: Comment Validation by Jörn Zaefferer. From Jörn's…

2 days ago