Advertisement
Guest User

php code for news archives

a guest
Apr 24th, 2012
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. <table style="clear:both; margin-top:15px;">
  2. <tbody>
  3. <tr>
  4. <td id="inset_box_color">Date</td>
  5. <td id="inset_box_color">Companies</td>
  6. <td id="inset_box_color">Publication</td>
  7. <td id="inset_box_color">Article</td>
  8. </tr>
  9. <?php
  10. $postslist = get_posts('order=DESC&orderby=post_date&category=6');
  11. foreach ($postslist as $post) :
  12. setup_postdata($post);
  13. ?>
  14. <tr>
  15. <td><?php the_date('n/j/Y'); ?></td>
  16. <td><?php echo strip_tags(get_the_tag_list('',', ','')); ?></td>
  17. <td><?php $key="Publication"; echo get_post_meta($post->ID, $key, true); ?></td>
  18. <td><?php the_title(); ?> [&nbsp;<a href="<?php echo get_permalink(); ?>">Read</a>&nbsp;]</td>
  19. </tr>
  20. <?php endforeach; ?>
  21. </tbody>
  22. </table>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement