Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="griditemleft">
- <?php
- $my_query = new WP_Query( 'posts_per_page=9&cat=6' );
- ?>
- <?php if ( $my_query->have_posts() ) {
- while ( $my_query->have_posts() ) {
- $my_query->the_post();
- echo get_the_post_thumbnail($id, 'thumbnail', array('class' => 'alignleft {margin-left: 30px; display: block;}', 'alt' => 'alttext'));
- }
- }
- ?>
- <?php
- wp_reset_postdata();
- ?>
- </div>
- Here is the css for griditemleft:
- .griditemleft{
- float: left;
- width: 600px;
- margin: 10px 40px 40px 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement