WordPress – How to get the blog description in HTML format

Sometimes you may need to add a line break or a HTML tag to the blog description in WordPress to get it to do something other than just the plain tagline.

Using the get_bloginfo(‘description’); function will pull that out, but it turns any HTML tags into HTML entities. A quick fix for that problem is to run it through a PHP function as well when you call it and the HTML tags will be used.

Here is how to do that:

One comment

  1. Hi, I try to do this, but it doesn’t
    work. I’m using Lukas theme for WP et my php is:
    // Add the blog
    description for the home/front page.

    $site_description = get_bloginfo( ‘description’, ‘display’);
    if ( $site_description && (is_home() || is_front_page() ) )
    echo ” | $site_description”;

    Can you help me?

Leave a Reply