Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="contentleft">
- <?php $my_query = new WP_Query('showposts=1');
- while ($my_query->have_posts()) : $my_query->the_post();
- $do_not_duplicate[] = $post->ID ?>
- <!-- do stuff -->
- <?php endwhile; ?>
- <div id="second-loop">
- <?php if (have_posts()) : while (have_posts()) : the_post();
- if (in_array($post->ID, $do_not_duplicate)) continue;
- ?>
- <!-- do stuff-->
- <?php endwhile; else: ?>
- <p><?php _e('Sorry, no posts matched your criteria.'); ?></p><?php endif; ?>
- </div>
- <div id="third-loop">
- <h3>Losowe Wideo: </h3>
- <?php
- $args = array( 'numberposts' => 2, 'orderby' => 'rand' );
- $rand_posts = get_posts( $args );
- foreach( $rand_posts as $post ) : ?>
- <a href="<?php the_permalink(); ?>"><img src=""/></a>
- <?php echo get_post_meta($post->ID, "wideo", true); ?>
- <?php endforeach; ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement