The MU forums have moved to WordPress.org

Display blog name (5 posts)

  1. carnold
    Member
    Posted 16 years ago #

    Using 1.3.3 and trying to find out the code to display the blog name in this code:
    <?php _e('Welcome to <?php bloginfo('name'); ?> at MTwG'); ?>
    I have also tried:
    <?php _e('Welcome to bloginfo('name') at MTwG'); ?>
    but both of these give a blank page. Can someone show me how to display a blog name in that code?

  2. DailyTestimony
    Member
    Posted 16 years ago #

    Try

    <?php _e('Welcome to '.bloginfo('name').' at MTwG'); ?>

  3. carnold
    Member
    Posted 16 years ago #

    Hey brother! That code produces:
    My Time with GodWelcome to at MTwG
    Weird that it orders it like that.

  4. KKWangen
    Member
    Posted 16 years ago #

    Try get_bloginfo('name') instead, if it doesn't work out, you may have to split it up:

    <?php _e('Welcome to'); ?> <?php bloginfo('name'); ?> <?php _e('at'); ?> MTwG

  5. carnold
    Member
    Posted 16 years ago #

    get_bloginfo('name') did the trick! Thank you all for your help.

About this Topic