Advertisement
deepbevel

Untitled

Jan 16th, 2012
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1.  
  2. <?php
  3. /**
  4. * Template Name: news
  5. *
  6. *
  7. * A custom page template for news.
  8. *
  9. * The "Template Name:" bit above allows this to be selectable
  10. * from a dropdown menu on the edit page screen.
  11. *
  12. * @package WordPress
  13. * @subpackage Twenty_Ten
  14. * @since Twenty Ten 1.0
  15. */
  16. ?>
  17.  
  18. <?php get_header(); ?>
  19.  
  20. <div id="container">
  21. <div id="content" role="main">
  22.  
  23.  
  24. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  25.  
  26. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  27. <?php if ( is_front_page() ) { ?>
  28. <h2 class="entry-title"><?php the_title(); ?></h2>
  29. <?php } else { ?>
  30. <h1 class="entry-title"><?php the_title(); ?></h1>
  31. <?php } ?>
  32.  
  33. <div class="entry-content">
  34. <?php the_content(); ?>
  35. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
  36. <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
  37.  
  38. <?/*php comments_template( '', true ); */?>
  39.  
  40. </div><!-- .entry-content -->
  41. </div><!-- #post-## -->
  42.  
  43.  
  44. <?php endwhile; // end of the loop. ?>
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52. <?php query_posts( array('posts_per_page' => -1, 'cat' => '3', ));
  53.  
  54. while ( have_posts() ) : the_post();
  55. echo '<li>';
  56. the_title();
  57. the_post_thumbnail('thumbnail');
  58. the_excerpt();
  59.  
  60. echo '</li>';
  61. endwhile;
  62.  
  63. // Reset Query
  64. wp_reset_query();
  65.  
  66. ?>
  67.  
  68.  
  69. </br>
  70.  
  71. <?php query_posts( array('posts_per_page' => -1, 'cat' => '4', ));
  72.  
  73. while ( have_posts() ) : the_post();
  74. echo '<li>';
  75. the_title();
  76. the_post_thumbnail('thumbnail');
  77. the_excerpt();
  78.  
  79. echo '</li>';
  80. endwhile;
  81.  
  82. // Reset Query
  83. wp_reset_query();
  84.  
  85. ?>
  86.  
  87. </div>
  88.  
  89. </div><!-- #container -->
  90.  
  91.  
  92.  
  93. <?php get_sidebar(); ?>
  94.  
  95. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement