Support » Fixing WordPress » PHP Questions

  • Resolved lleger


    I inputed the following php tag into my template.
    <?php if(is_author('2') == 'true') { ?>
    <img src="<?php bloginfo('stylesheet_directory') ?>/images/author/author1 title" alt="<?php echo get_bloginfo('name'); ?>" />
    <?php } else { ?>
    <img src="<?php bloginfo('stylesheet_directory') ?>/images/author/author2title.jpg"

    But it spits out this ugly error:
    Parse error: parse error, unexpected T_ENDWHILE in …/wp-content/themes/kiwi/authorPage.php on line 39

    I really wanted to specify a header image for a specified author, but I don’t know why it’s spitting an ugly error out. Am I overlooking something? I don’t think I wrote it wrong. I am using the new theme Kiwi by Yas. Any help anyone can offer would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • if the code above is the one you use, your need to close the image tag and close the “else {“.

    <img src=”<?php bloginfo(‘stylesheet_directory’)>/images/author/author2title.jpg” />
    <?php } ?>

    Yeah, I finally figured that out after looking over it a couple more times, thanks for the help though.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Questions’ is closed to new replies.