Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /* Template Name: News Page */ ?>
- <?php get_header(); ?>
- <div class="row">
- <!-- column 1 -->
- <div id="menu" class="col-md-3">
- <a href="/"><img class="logo" src="http://www.studionigroarch.com/sna_logo_gray.png"></a>
- <nav class="project-nav">
- </nav>
- <?php get_sidebar(); ?>
- </div>
- <!-- column 2 -->
- <div id="container" class="col-md-9">
- <?php
- $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
- $featured_args = array(
- 'post__in' => get_option( 'news' ),
- 'post_status' => 'publish',
- 'no_found_rows' => true,
- 'paged' => $paged
- );
- $featured = new WP_Query( $featured_args );
- ?>
- <?php if ( $featured->have_posts() ) : ?>
- <!-- Add the pagination functions here. -->
- <!-- Start of the main loop. -->
- <?php while ( $featured->have_posts() ) : $featured->the_post(); ?>
- <div class="projects-item" style="padding-bottom: 10px;">
- <a href="<?php $featured->the_permalink(); ?>">
- <?php $featured->the_post_thumbnail('thumbnail');
- $featured->set_post_thumbnail_size( 150 , 115 );
- ?>
- </a>
- <div style="width: 575px; float: right;">
- <span class="projects-title">
- <a href="<?php $featured->the_permalink(); ?>">
- <?php $featured->the_title(); ?>
- </a>
- </span>
- <?php $featured->the_excerpt(); ?>
- </div>
- </div>
- <!-- the rest of your theme's main loop -->
- <?php endwhile; ?>
- <!-- End of the main loop -->
- <!-- Add the pagination functions here. -->
- <div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div>
- <div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div>
- <?php else : ?>
- <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
- <?php endif; ?>
- <?php
- wp_reset_query();
- ?>
- </div>
- </div>
- <?php get_footer(); ?>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
- <script src="/wp-content/themes/blankslate/bootstrap.min.js"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement