Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="sortable">
- <tr>
- <th class="sorttable_nosort"></th>
- <th>Post Title</th>
- <th>Post Date</th>
- <th>Categories</th>
- <th>Tags</th>
- </tr>
- <?php
- query_posts( array(
- 'posts_per_page' => -1,
- 'orderby' => 'date',
- 'order' => 'DESC'
- )
- );
- $count = 0; // Used to assign custom keys to cells in the date column
- if(have_posts()) : while(have_posts()) : the_post();
- $count++;
- ?>
- <tr>
- <td><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail( array(50,50) ); ?></a></td>
- <td><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></td>
- <td sorttable_customkey="<?php echo $count; ?>"><?php the_date(); ?></td>
- <td><?php the_category(', '); ?></td>
- <td><?php the_tags('', ', '); ?></td>
- </tr>
- <?php endwhile; endif; ?>
- </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement