query_posts with meta_value_num and float:left;
-
Well, the problem is that querying for post with meta_value_num works but if one tries to float the results for example with float:left utter gibberish happens.
With order=ASC the orphan (the last post to be querried and that happens to be on the new line) gets to be on the right.
With order=DESC the orphan goes towards the left, but leaves the space of one empty element.
The code follows:
CSS:
.contact { float: left; text-align:left; margin:0px 18px 38px 0px; border-right: 1px solid #d9d9d9; padding-right: 9px; margin-right: 9px; margin-bottom: 22px; } WordPress markup: <?php $temp_query = $wp_query; ?> <?php query_posts('category_name=contacts&showposts=16' . '&meta_key=arv' . '&orderby=meta_value_num&order=asc'); ?> <?php while (have_posts()) : the_post(); ?> <div class="contact"> <div class="exportContact" id="post-<?php the_ID(); ?>"> <h3><?php the_title();?></h3> <div class="pictureContact"><?php echo get_the_post_thumbnail(); ?></div> <div class="h-line"><hr /></div> <div class="teamContact"> <?php the_content(''); ?> </div><!-- teamContact --> </div><!-- exportContact !--> </div><!-- contact !--> <?php endwhile; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘query_posts with meta_value_num and float:left;’ is closed to new replies.