SHOW:
|
|
- or go back to the newest paste.
1 | <?php /* Template Name: News Page */ ?> | |
2 | <?php get_header(); ?> | |
3 | ||
4 | <div class="row"> | |
5 | ||
6 | <!-- column 1 --> | |
7 | <div id="menu" class="col-md-3"> | |
8 | <a href="/"><img class="logo" src="http://www.studionigroarch.com/sna_logo_gray.png"></a> | |
9 | ||
10 | <nav class="project-nav"> | |
11 | </nav> | |
12 | ||
13 | ||
14 | ||
15 | <?php get_sidebar(); ?> | |
16 | </div> | |
17 | ||
18 | ||
19 | <!-- column 2 --> | |
20 | <div id="container" class="col-md-9"> | |
21 | ||
22 | <?php | |
23 | $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1; | |
24 | $featured_args = array( | |
25 | 'post__in' => get_option( 'news' ), | |
26 | 'post_status' => 'publish', | |
27 | - | 'paged' => get_query_var('page') |
27 | + | |
28 | 'paged' => $paged | |
29 | ); | |
30 | ||
31 | $featured = new WP_Query( $featured_args ); | |
32 | ?> | |
33 | <?php if ( $featured->have_posts() ) : ?> | |
34 | ||
35 | <!-- Add the pagination functions here. --> | |
36 | ||
37 | <!-- Start of the main loop. --> | |
38 | <?php while ( $featured->have_posts() ) : $featured->the_post(); ?> | |
39 | <div class="projects-item" style="padding-bottom: 10px;"> | |
40 | <a href="<?php $featured->the_permalink(); ?>"> | |
41 | <?php $featured->the_post_thumbnail('thumbnail'); | |
42 | $featured->set_post_thumbnail_size( 150 , 115 ); | |
43 | ?> | |
44 | </a> | |
45 | <div style="width: 575px; float: right;"> | |
46 | <span class="projects-title"> | |
47 | <a href="<?php $featured->the_permalink(); ?>"> | |
48 | <?php $featured->the_title(); ?> | |
49 | </a> | |
50 | </span> | |
51 | <?php $featured->the_excerpt(); ?> | |
52 | </div> | |
53 | </div> | |
54 | <!-- the rest of your theme's main loop --> | |
55 | ||
56 | <?php endwhile; ?> | |
57 | <!-- End of the main loop --> | |
58 | ||
59 | <!-- Add the pagination functions here. --> | |
60 | ||
61 | <div class="nav-previous alignleft"><?php next_posts_link( 'Older posts' ); ?></div> | |
62 | <div class="nav-next alignright"><?php previous_posts_link( 'Newer posts' ); ?></div> | |
63 | ||
64 | <?php else : ?> | |
65 | <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> | |
66 | <?php endif; ?> | |
67 | ||
68 | ||
69 | <?php | |
70 | wp_reset_query(); | |
71 | ?> | |
72 | ||
73 | </div> | |
74 | </div> | |
75 | <?php get_footer(); ?> | |
76 | ||
77 | <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
78 | <script src="/wp-content/themes/blankslate/bootstrap.min.js"></script> | |
79 | </body> | |
80 | </html> |