• So I have two Image Plug-Ins I want to use to add thumbnails on the index page with. ‘Get the Image’ And ‘Simple Post Thumbnails’

    I want to use both because I want the functionality of wordpress to grab a photo from a post (get the image) and as well as an easy way to upload photos to be thumbnails without using custom fields (simple post thumbnails.)

    So I was wondering it is possible to use a if-else statement to check if there is an image uploaded using ‘Simple Post thumbnails’. If there is, then that image is used as a thumbnail on the index page. If not, use ‘Get the Image’ to get an image from the post. And if there aren’t any images from either plug-ins, display an default image.

    I have three sections I’m trying to use this with. (Featured Post, Events Post, and Recent Posts)

    I’m not too familiar with php but here’s my attempt anyway…

    <?php
    
    if (is_category('Featured') )
      echo " <img src="<?php echo p75GetThumbnail($post->ID, 300, 300); ?>" class="left" width="300px" height="300px" /> ";
    else
      echo " <?php get_the_image( array('width' => '300', 'image_class' => 'thumbnailclass' ) ); ?> ";
    
    ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Displaying thumbnails on index page using two image plug-ins?’ is closed to new replies.