• Hi, i have some problems with my template for wp. I need 2 columns posts on one category, how fix empty space?

    screenshot

    .content{
    width: 470px;
    margin-left: 50px;
    border: 1px solid blue;
    float: left;
    margin-bottom: 25px;
    margin-top: 25px;
    }
    <?php
    $args = array (
    'category_name' => 'o nas',
    'posts_per_page' => 999
     );
    // the query
    $the_query = new WP_Query( $args ); ?>
    <?php if ( $the_query->have_posts() ) : ?>
      <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
        <div class="content">
    <h3><?php the_title(); ?></h3>
    <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'content_gallery_thumb', array('class' => 'content_gallery_thumb') ); } ?>
    <?php the_content();?>
    </div>
      <?php endwhile; ?>
      <?php wp_reset_postdata(); ?>
    <?php else:  ?>
      <p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
    <?php endif; ?>

The topic ‘[2 column] posts, one category’ is closed to new replies.