Images next to post titles (3 posts)

  1. omcfarlane
    Posted 8 years ago #

    I feel kind of lame posting this considering my last post and the seemingly easiness of this, but I can't seem to find the right answer to this. I want the align the images I post in the web editor around the the post title tag, but I can't figure where it fits in the loop.

    See here. The image is under the title tag. I'd like it aligned with the rest of the text. And in the future if I want, above the title text, etc.

    Thanks for all the help. I don't know why this is proving so difficult for me.

  2. Michael Bishop

    Posted 8 years ago #

    It will be difficult to have it above the title text, as the template calls the post title, then the content, so you'd have to create a class that moved the image above the post.

    Currently you are using an align on the image, you really should use a class to float the image. Since you are using a modified version of the default theme, there's already classes for such. .alignright .alignleft.

    So your image code would be <img class="alignleft" src="somelink" alt="image" title="title" />

  3. Cultivate
    Posted 8 years ago #

    Ive been trying to do a similar thing myself, see here http://wordpress.org/support/topic/99109?replies=5.

    ive found that putting the link to the image into the "optional excerpt" section of the post and adding the <?php the_excerpt(); ?> (http://codex.wordpress.org/Template_Tags/the_excerpt) into the post loop just before the title is called.

    then just style it with css floats.

Topic Closed

This topic has been closed to new replies.

About this Topic