Title: php help needed
Last modified: August 19, 2016

---

# php help needed

 *  [chsardianos](https://wordpress.org/support/users/chsardianos/)
 * (@chsardianos)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-help-needed-2/)
 * Hello there,
 * I have enter the code above into the end of my index template so as to show a
   number of latest posts as a thumbnail with the title below that, under my main
   post. I also use the Filosofo Old-Style Upload Plugin for uploading the images
   or the usual upload way that wp comes with.
 * The one problem is that I can’t get the image visible, but it displays only the
   title of the post and the X icon instead of the thumbnail. I’ve changed the path
   of the images directory and tried both the images folder into the theme’s folder
   and the uploads folder.
 * Is there any idea on how to fix that?
 * My second question is what do I have to change in the code above in order to 
   make the thumbnail be displayed one next another? And is it possible to add some
   kind of condition so as to display the posts 5-10 (sorting by date) instead of
   the latest five posts?
 * Thanks a lot for your time,
    I really need to find a solution on the above cause
   it’s the last thing remaining to finish my site.
 * Thanks again.
    Any idea will be appreciated! Chris.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [chsardianos](https://wordpress.org/support/users/chsardianos/)
 * (@chsardianos)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-help-needed-2/#post-1548106)
 * Sorry forgot the code 🙂
 * <?php
    // this is where the Features module begins query_posts(‘showposts=1&cat
   =199’); ?> //change the showposts number to the number of posts that you want
   to appear, and change cat=199 to your category number, which you can find out
   by going to Manage > Categories <?php while (have_posts()) : the_post(); ?> <
   div class=”thumbnails”>” rel=”bookmark” title=”Permanent Link to <?php the_title();?
   >”><img src=”<?php echo get_option(‘home’); ?>/wp-content/themes/themefolder/
   images/<?php // this is where the custom field prints images for each Feature
   $values = get_post_custom_values(“Image”); echo $values[0]; ?>” alt=”” /> <p 
   class=”title”>” rel=”bookmark”> <?php // this is where title of the Feature gets
   printed the_title(); ?></p></div> <?php endwhile; ?>
 *  Thread Starter [chsardianos](https://wordpress.org/support/users/chsardianos/)
 * (@chsardianos)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/php-help-needed-2/#post-1548148)
 * The problem with the images where solved, it was a mess of the saving directory.
 * Pending a way to show one thumbnail next to one other rather than one below the
   other, and very important how to show the 5th to 10th posts (depending by the
   posting date) rather than latest 5.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘php help needed’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [chsardianos](https://wordpress.org/support/users/chsardianos/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/php-help-needed-2/#post-1548148)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
