Navigation not working
-
Pagenavi doesn’t show up, Can anyone suggest?
This is my code.
<dl class=”news”>
<?php global $wp_query;?>
<?php
$paged = get_query_var(‘paged’) ? get_query_var(‘paged’) : 1;
$args = array(
‘posts_per_page’ => 5,
‘paged’ => $paged,
‘order’ => ‘DESC’
);
$myquery = new WP_Query( $args );
if ( $myquery->have_posts() ) :
while ( $myquery->have_posts() ) :
$myquery->the_post();
?><dt class=”cat-0<?php
$category = get_the_category();
echo $category[0]->cat_ID;
?>”>
<?php echo the_category(‘name’); ?></dt>
<dd class=”date”>
<?php the_time(‘Y/m/d’); ?>
</dd><dd class=”news-text”>
“>
<?php the_excerpt(); ?>
</dd><?php endwhile;endif; ?>
</dl>
<?php if(function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } ?>
<?php wp_reset_query(); ?>
- The topic ‘Navigation not working’ is closed to new replies.