WordPress.org

Forums

Have Posts in a Category Display in a Grid (3 posts)

  1. fathairyape
    Member
    Posted 5 years ago #

    Hello everyone,

    So I've been doing quite a bit of research online, but I haven't found the perfect solution for myself yet.

    My website is davidlernerschwartz.com, and the part I want to focus on is the T-shirt page at http://davidlernerschwartz.com/?cat=11.

    My dream is that instead of having them line up top to bottom now, I'd love for them to appear as many across as possible--for example, if the browser is larger and 4 can fit, then the T-shirts would stack 4 across and go down as necessary. If smaller, it would go 3 across, etc.

    How can I do this? Right now I'm making those images appear on that page, Category 11, by modifying the excerpts of each of the T-shirt posts. So basically each T-shirt post has an excerpt with an img src link of a smaller version of the T-shirt. Then, I pull the excerpts using PHP in the Category-11.php file. If you guys also have an idea about streamlining this (i.e. pulling the images from the posts and resizing them automatically using PHP) that would be awesome!

    Let me know if I can clarify myself in any way! Thanks in advance for your help!

    David

  2. Equal Web Creative
    Member
    Posted 5 years ago #

    To pull the images from the post you should use the new post_thumbnail function of wordpress. Search for it online it is easily implemented. Aligning your t-shirts is a matter of getting to grips with css

  3. fathairyape
    Member
    Posted 5 years ago #

    Okay, I'll try that out. Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic