Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aside>
- <ul>
- <?php
- // The Query
- $temp_query = $wp_query;
- $args = array(
- 'category_name' => 'faqs',
- 'paged' => $paged,
- 'posts_per_page' => 1,
- );
- $wp_query = new WP_Query( $args);
- // The Loop
- if (have_posts()) : ?>
- <?php while (have_posts()) : the_post(); ?>
- <li>
- <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a>
- </li>
- <?php endwhile; ?>
- </ul>
- <?php if ($wp_query->max_num_pages > 1) : ?>
- <nav>
- <ul>
- <li>More FAQs:</li>
- <li><?php previous_posts_link('Previous') ?></li>
- <li><?php next_posts_link('Next') ?></li>
- </ul>
- </nav>
- <?php endif; ?>
- <?php $wp_query = $temp_query; ?>
- <?php endif; ?>
- </aside>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement