Support » Fixing WordPress » Help with syntax

  • krystiank

    (@krystiank)


    Can anybody help me to rewrite this.

    <?php
    if(has_post_thumbnail()) {
      <a>"> the_post_thumbnail(); </a>
    } else {
      echo '<img src="/wp-content/themes/CampFire/imgs/send-photo-placeholder.png" />';
    }
    ?>

    [Please post code snippets between backticks or use the code button.]

    Basically I need to dispplay an image an link i to its post OR just display a placeholder image with no link.

    Thanks in advance

  • The topic ‘Help with syntax’ is closed to new replies.