Jump to content
Sign in to follow this  
drmk

Multiple pictures in posts (WHP)

Recommended Posts

drmk    0
drmk

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
Andrew    201
Andrew

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
drmk    0
drmk

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
Andrew    201
Andrew

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
Andrew    201
Andrew

on the 'img' tags...

Share this post


Link to post
Share on other sites
jnoh    0
jnoh

@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
drmk    0
drmk

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
Andrew    201
Andrew

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×