0

I need to create a grid layout with images, which change daily. So i could build a pool of images in advance for a whole month and the page shows automatically the appropriate image every day. The image could be named after the date or could be connected to this information on another way.

How do i achieve this in wordpress?

I'd appreciate your input.

0

You can put all the related images in a specific directory. Let's say the directory is grid_images and all the images have jpg extension. Then when you want to show the image, you can get the current day of the month and pull the image accordingly.

$image = PATH_TO_GRID_IMAGES_DIRECTORY .  date( 'j' ) . '.jpg';

Once you have the image variable you can use this as per your need.

Note: The images should be named as 1.jpg, 2.jpg, .... , 31.jpg

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.