WordPress.org

Ready to get started?Download WordPress

Forums

Theme design - how to have the title below the image? (2 posts)

  1. WMatos
    Member
    Posted 4 years ago #

    Hi there,

    I'm designing my first wordpress theme and would like to have my post title <h2> to be positioned under my image.

    For the record, I'll have an image for each post, and the way I've designed the blog, It needs to be positioned below the image.

    I guess I can try that using CSS, but wonder if there was a easier way around like in drupal.

    my code is:

    ...
    <?php the_content(''); ?>
    <?php the_title(); ?>
    ...

    In the example above, the title is below the image, but ALSO below the paragraph that accompany the image. I want:

    - image
    - title
    - paragraph

    Is it possible?

    Many thanks

  2. alchymyth
    The Sweeper & Moderator
    Posted 4 years ago #

    just a rough idea:
    find how to extract the image from the content;
    (for instance: http://www.livexp.net/wordpress/get-the-first-image-from-the-wordpress-post-and-display-it.html)

    insert that image into a div above the post title;
    then title;
    then content;
    use css to block display of image(s) in post, for instance with
    .post .entry img {display:none; }

Topic Closed

This topic has been closed to new replies.

About this Topic