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

The actually release of WordPress 2.8 announced

The WordPress development blog has put a date on the release of 2.8, plus some…

6 hours ago

Ben Dunkle on designing icons for WordPress [video]

I know many people attendedWordCamp 2009, in fact I believe there were 700 plus attendees.…

18 hours ago

Notes from WordCamp San Fransisco

Over view notes of San Francisco WordCamp 2009 by [insert creator]??

1 day ago

The state of the Press

I might like to start off by saying Happy Birthday WordPress. I don't have any…

2 days ago

Podcasting with Dave Moyer

Planning Who let you in? Format Daily Weekly Monthly Hour/half hour A show's Outline -…

2 days ago