Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // grab top voted posts in order (this is grabbing the page name too :?)
- $query_sql = "SELECT like_pid FROM " . $wpdb->prefix ."likes_count ORDER BY like_count DESC";
- $query_result = $wpdb->get_col( $wpdb->prepare ($query_sql, OBJECT));
- if ($query_result) {
- foreach ($query_result as $post_id) {
- $post = &get_post( $post_id );
- setup_postdata($post);
- ?>
- // Now count out two articles (more fail code?)
- <?php $count++; ?>
- <?php if ($count%2== 0) : ?>
- // Show the two articles
- <?php else : ?>
- //Now do something else
- <?php endif;?>
- <?php } ?>
- <?php } ?>
- <div class="next"> <?php next_posts_link('»' ,0); ?></div>
- <div class="previous"> <?php previous_posts_link('«' ,0); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement