Seaons Theme: Only Display Selected Images

I'm trying to edit the Seasons Theme /show.php to only have my first two .jpg images show on the public page and not a third file that is a PDF.

I'm not too familiar with PHP and I can't seem to figure out how to either block the .pdf from loading in the "primary" div, or to only "get" the first two full size images for the item to load.

Below is what the theme is set to display.

<div id="primary">
<?php if ((get_theme_option('Item FileGallery') == 0) && metadata('item', 'has files')): ?>
    <?php echo files_for_item(array('imageSize' => 'fullsize')); ?>
    <?php endif; ?>

I would appreciate any help or suggestions.

You could do this by getting around the files_for_item function to specify the files you want to display. files_for_item calls file_markup on an array of files, so you could dig up the array of files for the item and manipulate it as needed. So you could replace

<?php echo files_for_item(array('imageSize' => 'fullsize')); ?>


    $item = get_current_record('item');
    $files = $item->Files;
    //clobber the 3rd file
    echo file_markup($files, array('imageSize' => 'fullsize'), array('class'=>'item-file'));


I'm pretty sure that would work. But keep in mind that this will apply to the display for every item. If you need something more item-specific there's some more checks that can happen.

Thanks so much, your suggestion worked perfectly!