Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- Template Name: Custom Posts
- */
- get_header(); ?>
- <div id="primary">
- <div id="content" role="main">
- <?php while ( have_posts() ) : the_post(); ?>
- <?php get_template_part( 'content', 'page' ); ?>
- <?php endwhile; // end of the loop. ?>
- <?php /* Start This is the Information Posts Area */
- $temp_post = $post; // Store the Page the Post
- $wp_query= null;
- $wp_query = new WP_Query();
- $args = array(
- 'post_type' => 'information',
- 'posts_per_page' => 2,
- 'order' => 'desc',
- 'paged' => $paged,
- );
- $wp_query->query( $args );
- ?>
- <?php if ( $wp_query->have_posts() ) : ?>
- <?php /* Start wp-pagenavi support */ ?>
- <?php if(function_exists('wp_pagenavi') ) : ?>
- <?php wp_pagenavi(); ?>
- <?php else: ?>
- <?php twentyeleven_content_nav( 'nav-above' ); ?>
- <?php endif; ?><?php /* End wp-pagenavi support */ ?>
- <?php while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>
- <div id="post-<?php the_ID(); ?>" <?php // post_class(); ?>>
- <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
- <div class="entry-summary">
- <?php the_excerpt(); ?>
- </div><!-- .entry-content -->
- </div><!-- #post-## -->
- <?php endwhile; ?>
- <?php /* Start wp-pagenavi support */ ?>
- <?php if(function_exists('wp_pagenavi') ) : ?>
- <?php wp_pagenavi(); ?>
- <?php else: ?>
- <?php twentyeleven_content_nav( 'nav-below' ); ?>
- <?php endif; ?><?php /* End wp-pagenavi support */ ?>
- <?php endif; ?>
- <?php $post = $temp_post; // Reset the Post ?>
- </div><!-- #content -->
- </div><!-- #primary -->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement