wordpress - Page navigation can't find page 2 -


i don't know why page navigation do not work correctly.

there more 8 postings, shows 8 postings. , can't find page number '2' , text 'next page'. why?

<script> $(".m7").show(); </script><div class="ppddff" style="border-bottom:1px solid black; margin-bottom:2px;"> <?php if (have_posts()) : ?> <?php $post = $posts[0]; // hack. set $post the_date() works. ?>  <link rel="image_src" href="http://www.wapsmag.com/wp-content/uploads/2013/02/blog_th.jpg" />  <script>(function(d, s, id) {   var js, fjs = d.getelementsbytagname(s)[0];   if (d.getelementbyid(id)) return;   js = d.createelement(s); js.id = id;   js.src = "//connect.facebook.net/ko_kr/all.js#xfbml=1";   fjs.parentnode.insertbefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <style> .blttl a{ font-family: 'nanum myeongjo','nanummyeongjoextraboldweb', 맑은 고딕; color:#000;} .blttl a:hover { text-decoration:none; color:#000;} .tagstyle a{ font-family: 'nanum myeongjo','nanummyeongjoweb', 맑은 고딕; color:#000;} .tagstyle a:hover { text-decoration:none; color:#000;} .ttop { background-color:black;} .pagg{padding-top:100px; padding-bottom:0px;} .catttl { color:#000000; text-decoration:none; font-family:georgia, "times new roman", times, serif;}  .catttl a:hover{text-decoration:underline;} .ttyyuu { color:#000000; text-decoration:none; font-family:georgia, "times new roman", times, serif;}  .ttyyuu a:hover{text-decoration:underline;} .subm { margin:0 5px 0 5px; color:#666; text-decoration:none; font-family:georgia, "times new roman", times, serif;}  .subm a:hover { color:#000000; text-decoration:underline;} .cover1 { display:none;} </style>  <div style="width:100%; position:relative; overflow:hidden;">  <div style="width:900px; margin:20px auto; "> <div style="padding-bottom:20px; margin-bottom:20px; border-bottom:1px solid #666;"> <div style="width:150px; height:210px; float:left; margin-top:10px; margin-right:20px; position:relative;"><?php ciii_category_images(""); ?></div> <div style="width:730px; height:210px; float:left;"> <div class="blttl fvb" style="font-family: 'nanum myeongjo','nanummyeongjoextraboldweb', 맑은 고딕, 'georgia'; font-size:16pt; color:#000; padding-top:10px; margin-bottom:3px; text-align:left;" ><?php single_cat_title(); ?> </div>  <div style="font-size:10pt; color:#999; text-align:left; font-family:georgia, 'times new roman', times, serif; "class="ttyyuu"> <?php echo category_description( ); ?>    </div> <div style="width:900px; margin:10px auto; position:relative; height:30px; text-align:center;"> <div class="addthis_toolbox addthis_default_style " style="text-align:center; padding-left:0px;"> <a class="addthis_button_favorites"></a> <a class="addthis_button_preferred_1"></a> <a class="addthis_button_preferred_2"></a> <a class="addthis_button_preferred_3"></a> <a class="addthis_button_preferred_4"></a> <a class="addthis_button_compact"></a>  </div> <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=xa-505280914104c869"></script> <script>$(".addthis_button_tweet").css("width","90"); </script> </div> </div> <div style="clear:both;"></div> </div>   <?php while (have_posts()) : the_post(); ?>    <div style="width:900px; margin:0 auto;"> <div style="width:900px; margin:0 auto; padding-top:20px; padding-bottom:10px; text-align:center; font-size:16pt; color:#000; font-family: 'nanum myeongjo','nanummyeongjoextraboldweb',   맑은 고딕;"><?php the_title(); ?></div> <div style="width:900px; text-align:center; font-size:9pt; color:#999999; font-family: 'nanum myeongjo','nanummyeongjoweb', 맑은 고딕;"><?php the_time(); ?></div> <div style="width:900px; margin:0 auto; line-height:1.8em; font-size:10pt; color:#666666; font-family: 'nanum gothic','nanumgothicweb', 맑은 고딕; padding-bottom:30px;"><?php   the_content(); ?>  </div> <div style="width:900px; margin:0 auto; padding-top:20px; padding-bottom:20px; border-top:1px solid #ccc; border-bottom:1px solid #ccc; "> <div style="font-family:georgia, 'times new roman', times, serif; font-size:12pt; color:#000000; padding-bottom:5px; text-align:left;">tag <img src="/tagg.jpg" /></div> <div class="tagstyle" style="font-family: 'nanum myeongjo','nanummyeongjoweb', 맑은 고딕, 'georgia'; font-size:10pt; color:#000; text-align:left;"><?php the_tags( '<div   class="tagstyle">', ', ', '</div>'); ?></div> </div><div style="height:0px;"></div> </div>  <div class="blttl fvb" style="font-family: 'nanum myeongjo','nanummyeongjoextraboldweb', 맑은 고딕, 'gerogia'; font-size:16pt; color:#000; padding-top:10px; margin-bottom:3px; text-  align:left;" >   </div></div>   <?php endwhile; ?> <div style="clear:both;"> </div> </div>    <div style="padding-top:30px; border-top:1px solid black; width:900px; margin:0 auto;"><?php query_posts(array(     'showposts' => 1,     'orderby' => 'rand',     'category_name' => 'sbanner' //you can insert category name ));  ?>         <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>        <a href="<?php echo get_post_meta($post->id, 'url', true) ?>" target="_new"/> <?php the_post_thumbnail(); ?></a>           <?php endwhile; endif; ?></div>     </div>       <div class="navvi" style="padding-top:20px; padding-bottom:40px; width:900px; margin:0 auto;"><?php wp_pagenavi(); ?></div> <?php else : if ( is_category() ) { printf("<div class='center sorry' style='padding:150px 0 150px 0;'>sorry, there aren't posts in %s category yet.</div>", single_cat_title  ('',false));} endif; ?>  </div> <style>.sorry {font-family: 'nanum myeongjo','nanummyeongjoweb', 맑은 고딕; font-size:12pt;} .navvi { color:#666666;} .navvi a:hover { color:#000000; text-decoration:underline;} </style> </div> 

you doing second post query in page, before calling pagination plugin use query display pages, not first/main one.

<div style="padding-top:30px; border-top:1px solid black; width:900px; margin:0 auto;"> <?php query_posts(array(     'showposts' => 1,      'orderby' => 'rand',     'category_name' => 'sbanner' //you can insert category name ));  ?>         <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>        <a href="<?php echo get_post_meta($post->id, 'url', true) ?>" target="_new"/> <?php the_post_thumbnail(); ?></a>           <?php endwhile; endif; ?></div>     </div> 

before second query, value of wp_pagenavi() (check learn how : http://wordpress.org/support/topic/plugin-wp-pagenavi-returning-a-string-not-printing-it-directly)

then echo value call wp_pagenavi();


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -