• I use thumbnail on the homepage. I like to put the date of the post over the thumbnail, like that:
    http://i.imgur.com/SRpPi.jpg
    How is it possible?

    The code:

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
      <div class="img_holder"><?php the_post_thumbnail('homethumb', array('alt' => 'no alt', 'title' => ''.get_the_title().'' )); ?></div>
        <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">
          <?php the_title(); ?>
           </a></div>

    Thank you for your attention

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter kazary

    (@kazary)

    Someone can help?

    try

    the looping

    <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
      <div class="metabox">
    	<div class="entry-date"><?php the_date(); ?></div>
    	<div class="img_holder"><?php the_post_thumbnail('homethumb', array('alt' => 'no alt', 'title' => ''.get_the_title().'' )); ?></div>
      </div>
    	<div class="title"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></div>
    </div>

    and stylesheet

    .metabox{
    position:relative;
    }
    .metabox .entry-date{
    position:absolute;
    top: 0;
    left:0;
    z-index: 99;
    padding: 5px;
    color: #fff;
    background: #f00;
    }
    .metabox .img_holder{
    position:absolute;
    top: 0;
    left:0;
    z-index: 5;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Post Date’ is closed to new replies.