WordPress.org

Ready to get started?Download WordPress

Forums

What's the PHP code for putting your post thumbnails in 3 columns? (10 posts)

  1. madebymarco
    Member
    Posted 1 year ago #

    Can someone help me with codes on putting your 6 latest posts' thumbnails on a page (including the title and the css)

    The sample look can be found here: http://thefortsf.com/
    Although, those are created using plain html.

    Thanks!!!

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    It's actually not PHP, it's HTML and CSS (when done right)...Create a custom Page Template for this task if such layout is not provided by a theme or plugin...

  3. alchymyth
    Forum Moderator
    Posted 1 year ago #

    review:
    http://codex.wordpress.org/Class_Reference/WP_Query
    http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Function_Reference/the_post_thumbnail

    what theme are you using?

    what do you have so far?

    the example uses a html table to structure the images - do you need to do the same?

  4. Jay Hoffmann
    Member
    Posted 1 year ago #

    I would NOT recommend using tables, they haven't been relavent for some time now, and don't follow current web standards.

    As Seacoast said, it's HTML and CSS for the structure, PHP to call the posts and thumbnails. After reviewing the codex links alcymtyth showed you try using standard <div> tags with the float: left element and the width defined inside of a larger container. More info here about how to set that up: http://stackoverflow.com/questions/2156712/how-to-float-3-divs-side-by-side-using-css

  5. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    Almost all sites continue to use a basic table structure for site layout as no matter how often voted on, CSS3 nor HTML5, are the rule (yet)...

  6. Jay Hoffmann
    Member
    Posted 1 year ago #

    http://dev.w3.org/html5/spec/single-page.html

    That's the HTML5 spec put forward by the W3C. Working drafts began in 2008 and continue through today. This is the spec that browser developers follow to determine what features to add. This includes Opera, Mozilla, Webkit (Safari and Chrome) and in their newest version, even IE.

    http://en.blog.wordpress.com/2012/08/28/new-theme-twenty-twelve/

    This is Lance Willet explaining why the new Twenty Twelve theme is responsive, which is a CSS3 technique to make sure that a webpage adapts to the size of the screen it is being read on, on tablets, mobile devices and larger desktops. This is something that is not even remotely possible using a table layout.

    In 2012, to say that a table structure is still appropriate or recommended, and that HTML5 is undecided on, is just wrong and responsible WordPress users need to make sure to make their sites semantic, future friendly and standards compliant.

    (end diatribe)

  7. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    This is something that is not even remotely possible using a table layout

    For serving content to those who want a full screen experience, Site layout is critical...for serving content to other 'media' we invoke and add rules in that css section....@jhoffm34, can you post your example please of a fully compliant HTML5 and CSS3 site?

  8. Jay Hoffmann
    Member
    Posted 1 year ago #

    Sure, a good example of a three column responsive layout is at:
    http://simplegrid.info/
    with an explanation of how it is done including some tips on pseudo selectors. These days, it seems like being standards compliant is important in making sure your user always has the best experience. A table layout can certainly be adaptive to an extent, but it cannot be responsive and is not nearly as flexible.

    There are plenty more examples at http://mediaqueri.es/ which I recommend checking out for anyone who's interested.

  9. GirlGamer
    Member
    Posted 1 year ago #

    I actually just use the WordPress upload to have images show up in a column. Check [unrelated link moderated - start your own topic in 'Your WordPress' if you want to present your site] you can see everything I did just using WordPress and images.

  10. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    @ jhoffm34:

    Since this is a WordPress.org forum - can you share some WP sites that validate fully to HTML5 and CSS3 please???

    Getting simple sites to do so is not so difficult...

Topic Closed

This topic has been closed to new replies.

About this Topic