• Resolved dzupec

    (@dzupec)


    Hello all,

    I can’t figure out what’s wrong with my loop. When I add a new item thumbnail to my portfolio page they don’t line up next to each other and only the first thumbnail takes on the css styling, the other two don’t.

    ` <?php get_header(); ?>

    <section id=”content”>

    <?php the_content(); ?>

    <div class=”items”>
    <?php query_posts(“posts_per_page=-1&post_type=page&post_parent=10”); if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    “><img src=”<?php echo get_post_meta($post->ID, “thumbnail”, true); ?>” alt=”” />
    </div>

    <?php endwhile; wp_reset_query(); ?>

    </section>

    <?php get_footer(); ?>

    here’s the link to my portfolio page:

    Thank you : )

Viewing 2 replies - 1 through 2 (of 2 total)
  • please re-post the code, this time marking it with the ‘code’ button – see forum guidelines.

    general:
    you are closing a div within the loop which has been opened before the loop; i.e. for every item within the loop the code adds the closing div which totally destroys the layout.

    the posted code at the moment is too corrupted to use;
    once you re-posted the code, I can give more details.

    Thread Starter dzupec

    (@dzupec)

    Hello alchymyth,

    I had just figured that out and you’re exactly right. I put the loop outside of the div and now it works. Thank you : )

    David

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Somethings wrong with my wordpress loop’ is closed to new replies.