Create Shortcode to Call Bloginfo with WordPress Function

May you show blog information automatically show in the post. This shortcode can show it for you. You can add this code in the functions.php in theme editor.


function star_bloginfo_shortcode($atts) {

            'key' => '',
            ), $atts));

    return get_bloginfo($key);

add_shortcode('bloginfo', 'star_bloginfo_shortcode');


[bloginfo key='name']

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *