Archived

This topic is now archived and is closed to further replies.

  • 0

Multiple pictures in posts (WHP)

Question

Posted · Report post

One of the things I frequently have in my blog (www.yousuckatcraigslist.com) is multiple pictures in a post. I'm only testing WHP right now, but when I look at posts that have multiple pictures, they show up in a single centered column -- in other words, it's not putting more than one picture per line, even if there's plenty of room for more than one picture in the width of the page. Since I'm just testing, I can't actually point you to a page to look at, but I can email you a screenshot if you need it. Is there a way to change/defeat/control this? Can there be? I really don't want each picture to appear on its own line.

Share this post


Link to post
Share on other sites

9 answers to this question

Posted · Report post

To do multiple pictures per line, all you need to do is use the WordPress gallery function or float them by adding a class of alignleft, or alignright. You could also try some plugins like the nexgen gallery plugin

Share this post


Link to post
Share on other sites

Posted · Report post

I can't always use the gallery function because sometimes I have pictures that go with one part of a post and other pictures that go with another part; the gallery puts them all in at the same time. It seems like it would be easier to default to "as many pictures as fit on a line" and then if people wanted each one on a separate line they could just add carriage returns between them.

Share this post


Link to post
Share on other sites

Posted · Report post

If it were me, I'd just float them all (add classes of alignleft, or alignright) and they would automatically have this type of functionality.

Share this post


Link to post
Share on other sites

Posted · Report post

Where would I add this?

Share this post


Link to post
Share on other sites

Posted · Report post

on the 'img' tags...

Share this post


Link to post
Share on other sites

Posted · Report post

@drmk so it would look something like this if you want them to float left:

<img url="[your image url]" class="alignleft"... 
or like this if you want them to float right:
<img url="[your image url]" class="alignright"...

Make sure you close the tags.

Share this post


Link to post
Share on other sites

Posted · Report post

Thank you, jnoh, that's what I needed to know.

Share this post


Link to post
Share on other sites

Posted · Report post

Okay, wait ... so the thing is, I currently have almost 500 posts, most of which have pictures. I don't want to go back through each post and add in the "alignleft" class for each picture on each post just so I can use this theme. Is there a way to set it globally? If so, where?

Share this post


Link to post
Share on other sites

Posted · Report post

you could make a CSS rule for that for instance: `.hentry img {float:left;}` this would float all your images in the 'post content' area to the left by default.

Share this post


Link to post
Share on other sites