WordPress.org

Forums

Help with syntax (1 post)

  1. krystiank
    Member
    Posted 4 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.