0

I have all the CSS classes set to display images in a custom portfolio theme. I am allowing for images of different sizes and proportions (landscape, portrait, etc) to be tiled next to each other and to be responsive (like the images here: http://studionudge.com/). My problem is getting the images attached to posts (a custom portfolio post type) to display properly in these custom classes. I don't know how to get that level of control over images, basically.

I am looking to make something like is seen here: http://www.northbounddesign.com/creativity-fluid/

If you look at the source, the images are all part of the post, and are all styled within columnar divs to look nice and to be responsive, and the containing div depends on the size of the image (so differently sized images would need different classes). I am wondering how to do this. Do you think the images were simply added into the WYSIWYG editor and then formatted using the HTML editor there? Is there a more user-friendly or perhaps automated way to do this? (I envision separate fields to specifically upload images of a certain size to, or something of that nature.)

To ask this question in another way: I have text content controlled through meta boxes to give myself more fine control over layout, but I don't know how to do this with images in Wordpress. Any advice to point me in the right direction would be helpful.

I have looked into styling the existing Wordpress gallery, but that doesn't give me enough control over individual images, and doesn't, I think, solve the problem of needing some images to be in a different class than others. I have looked into meta boxes, but meta boxes seem better suited to controlling text content (is there a metabox to just upload one image? I could work with that, I think.) I have looked into plugins, but most are gallery plugins that display image thumbnails of uniform size.

1 Answer 1

-1

It looks to me that those images, along with their divs, have been added directly into the editor. So, it's probably being updated by a developer, or at least someone HTML savvy.

I'm not sure what you mean by 'meta boxes'. A meta box is basically any collapsible box within the WP admin interface. If you actually mean custom fields, then there are many plugins for adding images to posts. Take a look at Advanced Custom Fields, as just one example.

3
  • It's a shame that whoever downvoted this answer isn't articulate enough to provide a reason for doing so.
    – vancoder
    Apr 10, 2013 at 22:26
  • Ok, cool, thanks. Yeah, by meta box I did mean the collapsible box in the admin interface. If it's possible to upload one image through a meta box there, then I feel like I could have direct control over that image and could position it within a layout. I already have additional text content controlled through meta boxes, and thought maybe one could control images as well. I have used ACF before and will look at it again to see if it can work for what I have planned.
    – Hanna
    Apr 11, 2013 at 15:12
  • @Hanna You are welcome. Please accept my answer by clicking the tick next to it, so other people will recognize it as correct.
    – vancoder
    Apr 11, 2013 at 16:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.