WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Two-column horizontal loop changes into single vertical loop, help! (3 posts)

  1. alessia_e
    Member
    Posted 3 years ago #

    Hello,

    I have been breaking my head over this issue for a week.. I finally need to ask for help for the well being & my sanity :)

    I've created a newspaper-style layout for a friends's site: featured (latest) post on top, and a two-column layout underneath with a 10 most recent posts.

    The main post/first loop - works.
    The posts underneath work ... in theory - they run as one post per row, when I created the design to run as two posts per row. I have dissected the CSS over & over and I am sure it's the loop & how I am integrating it. I've checked all possible options and I think the one which works for me is this: http://digwp.com/2010/03/wordpress-post-content-multiple-columns/#horizontal

    Here is my code where I am having issues (should display as a two-column, but it displays as a one-column)

    ++++++++++++++++++++++++++++++++++++++++

    <div id="wrapper">

    <?php query_posts('showposts=10&offset=1'); ?>
    <?php while (have_posts()) : the_post(); ?>

    <div id="left">

    <?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?>

    <div id="image">
    " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&w=450&h=300&zc=1" alt="<?php the_title(); ?>" class="img_secondary" />
    </div>

    <?php endif; ?>

    <div id="headline">
    <h2><?php the_title(); ?></h2>
    </div>

    <div class="posted2">
    <?php the_time('F j, Y') ?> | <?php the_category(',') ?> | <?php comments_popup_link(__( '0 Comments' ), __( '1 Comment' ), __( '% Comments' )); ?>
    </div>

    <div id="post">
    <p>
    <?php the_excerpt(); ?>
    </p>
    <p>
    #more-<?php the_ID(); ?>" title="Continue Reading <?php the_title_attribute(); ?>" class="color" rel="bookmark">Continue Reading →</p>

    </div>

    <?php endwhile; ?>
    </div>
    </div>

    ++++++++++++++++++++++++++++++++++++++++

    Any advice would be very very much appreciated.

  2. alessia_e
    Member
    Posted 3 years ago #

    The website is shalasrabbithole.com by the way, if you'd like to take a look.

  3. alessia_e
    Member
    Posted 3 years ago #

    I don't really know HOW I fixed it, but I did... Here is the code:

    <div id="wrapper">

    <?php query_posts('showposts=10&offset=1'); ?>
    <?php while (have_posts()) : the_post(); ?>

    <div id="left">

    <?php if( get_post_meta( $post->ID, "image_value", true ) ) : ?>

    <div id="image">
    " rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><img src="<?php bloginfo( 'template_directory' ); ?>/timthumb.php?src=<?php echo get_post_meta( $post->ID, "image_value", true ); ?>&w=450&h=300&zc=1" alt="<?php the_title(); ?>" class="img_secondary" />
    </div>

    <?php endif; ?>

    <div id="headline">
    <h2><?php the_title(); ?></h2>
    </div>

    <div class="posted2">
    <?php the_time('F j, Y') ?>
    |
    <?php the_category(',') ?> | <?php comments_popup_link(__( '0 Comments' ), __( '1 Comment' ), __( '% Comments' )); ?>
    </div>

    <div id="post">
    <p>
    <?php the_excerpt(); ?>
    </p>
    <p>
    #more-<?php the_ID(); ?>" title="Continue Reading <?php the_title_attribute(); ?>" class="color" rel="bookmark">Continue Reading →</p>

    </div>

    </div>

    <?php endwhile; ?>

    </div>

Topic Closed

This topic has been closed to new replies.

About this Topic