Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Images changing relating to date – WordPress/PHP

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #25968
    robbiefa
    Member

    I’m new both to php and also wordpress so please excuse me if this is a simple problem.

    I’m hoping to create a blog with dates being the emphasis (please see image). I’m just not sure how to create the php that will call in an image that will relate to a date (not sure if that is the right way to go about it). I want to create 31 images that will relate to the specific day in the month (but not in order).

    I hope this isn’t a mental request and I really appreciate any help.

    Regards,

    Rob

    http://robertfarrelly.com/blog_image.jpg
    http://www.robertfarrelly.com/wordpress/index.php

    #63253
    TheDoc
    Member

    The following will not be proper code, but just to give you an idea:

    $numberday = wp_super_date_thing(‘parameters to only show the day’s number’);

    Then, in the loop where ever you’re displaying this day:

    <img alt="$numberday" class="youprobablyhaveaclass" src="images/my-image-$numberday.jpg" />

    Then all would have to do is name each image my-image-1.jpg, my-image-2.jpg, etc…

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.