Advertisement
Guest User

custom template

a guest
Feb 12th, 2013
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: custom home
  4. */
  5. ?>
  6. <?php get_header(); ?>
  7. <div id="wrap">
  8. <!-- Main Content-->
  9. <img src="<?php bloginfo('template_directory');?>/images/content-top.gif" alt="content top" class="content-wrap" />
  10. <div id="content">
  11. <!-- Start Main Window -->
  12. <div id="main">
  13. <div class="new_post">
  14. ...
  15. </div>
  16. <h2>Recent Posts</h2>
  17. <ul>
  18. <?php
  19. $args = array( 'numberposts' => '5' );
  20. $recent_posts = wp_get_recent_posts( $args );
  21.  
  22. foreach( $recent_posts as $recent ){
  23. echo '<li><a href="' . get_permalink($recent["ID"]) . '" title="Look '.esc_attr($recent["post_title"]).'" >' . $recent["post_title"].'</a> </li> ';
  24. }
  25. ?>
  26. </ul>
  27. </div>
  28. <?php get_template_part('includes/entry'); ?>
  29. </div>
  30. <!-- End Main -->
  31. <?php get_sidebar(); ?>
  32. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement