Jump to content


Photo

Multiple pictures in posts (WHP)


This topic has been archived. This means that you cannot reply to this topic.
9 replies to this topic

#1 drmk

drmk

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 07 November 2009 - 11:22 PM

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.

#2 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 08 November 2009 - 06:23 PM

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

#3 drmk

drmk

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 10 November 2009 - 02:42 AM

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.

#4 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 10 November 2009 - 10:57 PM

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.

#5 drmk

drmk

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 14 November 2009 - 04:06 PM

Where would I add this?

#6 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 14 November 2009 - 06:57 PM

on the 'img' tags...

#7 jnoh

jnoh

    Advocate

  • Members
  • PipPipPipPipPip
  • 502 posts

Posted 14 November 2009 - 09:24 PM

@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.

#8 drmk

drmk

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 19 November 2009 - 03:38 AM

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

#9 drmk

drmk

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 19 November 2009 - 03:40 AM

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?

#10 arpowers

arpowers

    Founder

  • Administrators
  • 3271 posts

Posted 19 November 2009 - 08:02 AM

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.