Title: Create a slideshow
Last modified: August 19, 2016

---

# Create a slideshow

 *  [maisdesign](https://wordpress.org/support/users/downloadtaky/)
 * (@downloadtaky)
 * [15 years, 4 months ago](https://wordpress.org/support/topic/create-a-slideshow/)
 * Hi, I’m trying to create my first Wp Template but I’m a self-made programmer (
   it means that my knowledge of PHP and stuff like this is almost 0 😛 ) anyway
   I almost did everything the only thing I can’t find (and it’s 2 months that I’m
   googling…) is a good tutorial that teaches me how to add a slideshow (NO PLUGIN)
   to my new template…
 * I would like this slideshow to automagically catch the first image of each post
   and show so if I click on the image it links to the post…
    No way to find …. 
   is there anyone who can teach me how to do it? I placed also a few bids on Fiverr
   but I had only 2 answers and no one solved my problem!
 * Actually to “catch” the first image of each post I use this:
 * //A different way to show thumbnails
    function getImage($num) { global $more;
   $more = 1; $link = get_permalink(); $title = get_the_title (); $content = get_the_content();
   $count = substr_count($content, ‘<img’); $start = 0; for($i=1;$i<=$count;$i++){
   $imgBeg = strpos($content, ‘<img’, $start); $post = substr($content, $imgBeg);
   $imgEnd = strpos($post, ‘>’); $postOutput = substr($post, 0, $imgEnd+1); $postOutput
   = preg_replace(‘/width=”([0-9]*)” height=”([0-9]*)”/’, ‘/width=”50px″ height=”
   50px″/’,$postOutput); $image[$i] = $postOutput; $start=$imgEnd+1; } if(stristr(
   $image[$num],'<img’)) { echo ‘[‘.$image[$num].”](https://wordpress.org/support/topic/create-a-slideshow/&apos;.$link.&apos;?output_format=md)“;}
   $more = 0; }
 * Then when I need to show the image I have to write this:
    <?php getImage(‘1’);?
   > and it works 🙂
 * Suggestions? Prays? Blames?
    Could someone please help me? Thanks a lot!
 * If someone want to take a look to the template I’m creating here is an example:
   [http://test.downloadtaky.info/](http://test.downloadtaky.info/)
    There is a 
   slideshow but it doesn’t work as I wish… Thanks once again!

The topic ‘Create a slideshow’ is closed to new replies.

## Tags

 * [how](https://wordpress.org/support/topic-tag/how/)
 * [slideshow](https://wordpress.org/support/topic-tag/slideshow/)
 * [template](https://wordpress.org/support/topic-tag/template/)
 * [to](https://wordpress.org/support/topic-tag/to/)
 * [tutorial](https://wordpress.org/support/topic-tag/tutorial/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [maisdesign](https://wordpress.org/support/users/downloadtaky/)
 * Last activity: [15 years, 4 months ago](https://wordpress.org/support/topic/create-a-slideshow/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
