WordPress.org

Ready to get started?Download WordPress

Forums

Linking back to featured image page (1 post)

  1. GabrielTheRabbit
    Member
    Posted 1 year ago #

    I'm displaying featured images from child pages of Portfolio, and would like the images to link back to their corresponding page. Can you point out what I'm doing wrong here:

    <?php
    $projects = get_pages( array('sort_column' => 'menu_order', 'sort_order' => 'ASC', 'child_of' => 79) );  
    
    if (!$projects) {
    
      echo "problem";
    
    } else {
    
      foreach( $projects as $project ) { ?>
        <div class="grid_3">
        <a href="<?php get_permalink( $project->ID ); ?>">
        <?php echo get_the_post_thumbnail( $project->ID, 'full' ); ?>
        </a>
        </div>
    <?php }
    }
    ?>

    Thank you. :)

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by GabrielTheRabbit
  • This topic is not resolved
  • WordPress version: 3.5.2