[resolved] PHP Questions (3 posts)

  1. lleger
    Posted 10 years ago #

    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.

  2. lynk
    Posted 10 years ago #

    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 } ?>

  3. lleger
    Posted 10 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic