• 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

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

Viewing 1 replies (of 1 total)
  • Hi Rob,
    I should be able to help you out.
    What you want to do is split, the images into months and days and use a bit of CSS to display the date image behind the text and PHP to call the date images.
    Something like: index.php

    <div class="entry" style="background: url(https://www.robertfarrelly.com/wordpress/wp-content/uploads/2009/09/<?php the_time('dm') ?>.png);">
      <?php the_content('Read the rest of this entry &raquo;'); ?>
    </div>

    Then some stuff in style.css to make it pretty.

    Hope that helps, if you still need help contact me via my website.

Viewing 1 replies (of 1 total)
  • The topic ‘Replacing a date with an image.’ is closed to new replies.