Forums

Replacing a date with an image. (2 posts)

  1. robbiefa
    Member
    Posted 2 years ago #

    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

  2. tomontoast
    Member
    Posted 2 years ago #

    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(http://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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.