Support » Themes and Templates » Move title and date below starting image?

  • Hi,

    I’m trying to have my blog start with an image and then have the title sit under it.

    How do I make this work since the images are included in the post I write in the admin panel?

    This is the code I have from another theme….

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php the_date(”,'<h3 class=”dadate”>’,'</h3>’); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h3 class=”storytitle”>” rel=”bookmark”><?php the_title(); ?></h3>

    <div class=”storycontent”>
    <?php the_content(__(‘(more…)’)); ?>

    <?php endwhile; else: ?>
    <?php endif; ?>


    Any tips would be helpful.

    Thanks so much.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Mark…

    I want to do the same! Did you have any success?

    The only way seems to be to use the Custom Field Images plugin, which allows you to place an image anywhere outside the Loop.

    Unfortunately, this adds a bunch of steps, and I’d really like to streamline so I don’t have to add image locations into the custom fields.

    Let me know!

    This could be done in CSS, probably with some trial and error, if you have a fixed image size.

    You may need to delete the <div class="storycontent"> (and its closing tag) for this to work–not sure.

    In your stylesheet, find the rule for .post and add the line “position: relative;”; if it doesn’t exist, then create something like this:

    .post {
    position: relative;

    This actually may not be necessary.

    Next, add the following to your stylesheet (definitely necessary):

    .post h3 {
    position: relative:
    top: 345px; /* this actually needs to be the known height of the image */
    .post img:first-child { /*this should match only the first img in a post */
    position: relative:
    top: -345px; /* this actually needs to be the known height of the image */

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Move title and date below starting image?’ is closed to new replies.