Help please ! – Modifying the "catch_that_image()" function.
-
Hello folks, I am a newbie to coding and PHP, but I am attempting to build a WordPress theme for a personal blog and need some help from the WP / PHP experts.
I am using the “catch_that_image()” function to pull out the first image of every post and display it as a Thumbnail (through Timthumb)
I am trying to figure out a way in which the function can be modified to pull out a random image from every post. [Instead of the first post, it should pull out a random image]
Since most of my posts will have atleast 25 images each, it would be great if the function can pull out a random image from these 25 to use as a thumbnail.
If an occasional post has less than 25 images and the function is unable to find the random image it is looking for, it should just show the first image as a default.
Please help me out ??
The “catch_that_image()” discussion is on this link:
https://www.ads-software.com/support/topic/retreive-first-image-from-post
- The topic ‘Help please ! – Modifying the "catch_that_image()" function.’ is closed to new replies.