Advertisement
deepbevel

Untitled

Jan 4th, 2012
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.12 KB | None | 0 0
  1. <?php
  2. /**
  3. * The template for displaying all pages.
  4. *
  5. * This is the template that displays all pages by default.
  6. * Please note that this is the WordPress construct of pages
  7. * and that other 'pages' on your WordPress site will use a
  8. * different template.
  9. *
  10. * @package WordPress
  11. * @subpackage Twenty_Ten
  12. * @since Twenty Ten 1.0
  13. */
  14.  
  15. get_header(); ?>
  16.  
  17. <div id="container">
  18. <div id="content" role="main">
  19.  
  20. <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
  21.  
  22. <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  23. <?php if ( is_front_page() ) { ?>
  24. <h2 class="entry-title"><?php the_title(); ?></h2>
  25. <?php } else { ?>
  26. <h1 class="entry-title"><?php the_title(); ?></h1>
  27. <?php } ?>
  28.  
  29. <div class="entry-content">
  30. <?php the_content(); ?>
  31. <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
  32. <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
  33. </div><!-- .entry-content -->
  34. </div><!-- #post-## -->
  35.  
  36. <?php if (is_page('test2')) { ?>
  37.  
  38. <?/*THIS IS THE BASIC QUERY CODE*/?>
  39.  
  40. <?php
  41.  
  42. query_posts( array( 'posts_per_page' => 2, 'cat' => '3', 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1 ), ));?>
  43.  
  44. <?php if (have_posts()) : ?>
  45. <?php while (have_posts()) : the_post(); ?>
  46. <h4 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'cc' ) ?> <?php the_title_attribute(); ?>"> <?php the_title(); ?> </a></h4>
  47.  
  48. <?php endwhile; ?>
  49.  
  50. <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">←</span> Older posts', '' ) ); ?></div>
  51. <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">→</span>', '' ) ); ?></div>
  52.  
  53. <?php endif; ?>
  54. <?php wp_reset_query();?>
  55.  
  56. <?/*END BASIC QUERY CODE*/?>
  57.  
  58. <?php } ?>
  59.  
  60. <?php comments_template( '', true ); ?>
  61.  
  62. <?php endwhile; // end of the loop. ?>
  63.  
  64. </div><!-- #content -->
  65. </div><!-- #container -->
  66.  
  67. <?php get_sidebar(); ?>
  68. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement