SHOW:
|
|
- or go back to the newest paste.
1 | <?php | |
2 | /* | |
3 | Template Name: Blog | |
4 | */ | |
5 | ||
6 | ||
7 | get_header(); ?> | |
8 | <div id="portfolio"> | |
9 | <header class="portfolio"> | |
10 | <ul id="menu"> | |
11 | <?php wp_list_pages('sort_column=menu_order&title_li='); ?> | |
12 | </ul> | |
13 | ||
14 | ||
15 | <div id="portfolio-content"> | |
16 | <h1 name="top">Hello.</h1><br /> | |
17 | <p>lorem ipsum</p> | |
18 | </div> </header> | |
19 | ||
20 | <br style="clear: left;" /> | |
21 | ||
22 | <?php | |
23 | ||
24 | - | $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; |
24 | + | if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } |
25 | elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } | |
26 | else { $paged = 1; } | |
27 | ||
28 | query_posts('category_name=blog&paged=' . $paged); | |
29 | ||
30 | ?> | |
31 | <?php while ( have_posts() ) : the_post(); ?> | |
32 | <div id="entry"> | |
33 | <article <?php post_class(); ?> id="post-<?php the_ID(); ?>"> | |
34 | <section class="entry-header"> | |
35 | <h2><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> | |
36 | <h3><?php echo get_the_date(); ?></h3> | |
37 | </section> | |
38 | <section class="entry-content"> | |
39 | <?php global $more; $more = 0; the_content('more...'); ?> | |
40 | ||
41 | </section> | |
42 | </article> | |
43 | </div> | |
44 | <?php | |
45 | endwhile; | |
46 | next_posts_link('Previous Posts'); | |
47 | previous_posts_link('Next Posts'); | |
48 | ?> |