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

17 Essential Link Building Statistics and Trends for Enhanced SEO

The analysis highlights the significance of link-building in SEO, revealing that most websites neglect backlinks,…

11 mins ago

Get a copy of the book Blog Blazers!

Hey everyone, I've got two copies of Blog Blazers that I want to give away…

12 hours ago

101 of the best blogging tools in 2024,

101 of the best blogging tools in 2024. Having the best blogging tools continues to…

24 hours ago

Remove the title attribute using jQuery

In WordPress, when you use wp_page_menu your anchor attribute's usually carry a title with the…

1 day ago

In case you missed it, ma.tt is all new!

You should head over the the newly redesigned site of Matt Mullenweg, the inventor of…

2 days ago

Working on a new theme called WordCult

So I have been really busy, and haven't been able to put up a new…

2 days ago