treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Wordpress PHP Styling Issue

  • I have the "get the image" plugin running on a Wordpress site along with some PHP pulling in the page title and date created. The goal is to have this page pull thumbs, titles, and date created to display on a page showcasing other pages - a hub if you will.

    It all works wonderfully - but I am having trouble styling the page. I need the thumbs to line up in a grid.

    The PHP Loop:
    <?php query_posts('post_type=page&meta_key=gallerypage&meta_value=yes'); ?>

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=\"hub-item\">
    <?php get_the_image( 'default_size=medium&width=100&height=100&image_class=feature' ); ?><br />
    <a href=\"<?php the_permalink() ?>\" rel=\"bookmark\"><?php the_title(); ?></a><br />
    Posted <?php the_date(); ?>
    </div>


    The CSS:
    .hub-item { float: left; text-align: center; width: 125px; padding: 0px 0px 10px 0px; }


    The Results:
    http://www.d2lgraphics.com/clients/abou ... page_id=33

    Any suggestions would be greatly appreciated!

    Kindly,
    Frank
  • why dont you try and put a grid system in.... and populate with the itmes.

    e.g.

    <div class=\"gridbox\">
    <?php <div class=\"boxes\"> your php to get from wordpress </div> end php ?>
    </div>
  • Issue SOLVED. I had a </div> in the wrong place.

    :)