{"id":15907,"date":"2014-07-28T18:42:23","date_gmt":"2014-07-28T18:42:23","guid":{"rendered":"https:\/\/pt.wordpress.org\/support\/2014\/07\/28\/paginacao-com-wp_pagenavi\/"},"modified":"2014-07-28T18:42:23","modified_gmt":"2014-07-28T18:42:23","slug":"paginacao-com-wp_pagenavi","status":"closed","type":"topic","link":"https:\/\/pt.wordpress.org\/support\/topic\/paginacao-com-wp_pagenavi\/","title":{"rendered":"Pagina\u00e7\u00e3o com WP_PageNavi"},"content":{"rendered":"<p>Ol\u00e1 pessoal,<br \/>\nEstou terminando um projeto pessoal (um blog), mas acabei me deparando com um problema de pagina\u00e7\u00e3o que n\u00e3o estou conseguindo resolver.<br \/>\nTentei fazer a pagina\u00e7\u00e3o sem plugin e n\u00e3o deu certo, agora tentei utilizar o WP_PageNavi, ele funciona, aparece os bot\u00f5es de p\u00e1gina abaixo dos posts, mas quando clico, simplesmente n\u00e3o funciona, por\u00e9m, o endere\u00e7o &#8216;seta&#8217; para a p\u00e1gina correspondente ao bot\u00e3o.<\/p>\n<p>Aqui vai meu c\u00f3digo, eu acredito que seja um erro simples na query, mas n\u00e3o encontro \u00ac\u00ac<\/p>\n<pre><code>&lt;?php get_header(); ?&gt;\n\n\t&lt;div id=&quot;corpo&quot;&gt;&lt;!--In\u00edcio corpo--&gt;\n\t\t&lt;div id=&quot;estrutura&quot;&gt;&lt;!--In\u00edcio estrutura--&gt;\n\n\t\t\t&lt;div id=&quot;cont-esquerdo&quot;&gt;&lt;!--In\u00edcio conte\u00fado esquerdo--&gt;\n\t\t\t\t&lt;div id=&quot;cont-superior&quot;&gt;\n\t\t\t\t\t&lt;div id=&quot;box-esq-um&quot;&gt;\n\t\t\t\t\t\t\t&lt;div class=&quot;callbacks_container&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;ul class=&quot;rslides&quot; id=&quot;slider&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;li&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;&lt;?=bloginfo(&#039;template_url&#039;)?&gt;\/slide\/slide_imagens\/img1.jpg&quot; width=&quot;800&quot; height=&quot;400&quot; alt=&quot;&quot; title=&quot;&quot;&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;p class=&quot;caption&quot;&gt;Teste da primeira viagem&lt;\/p&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t&lt;\/li&gt;\n\t\t\t\t\t\t\t\t\t&lt;li&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;&lt;?=bloginfo(&#039;template_url&#039;)?&gt;\/slide\/slide_imagens\/img2.jpg&quot; width=&quot;800&quot; height=&quot;400&quot; alt=&quot;&quot; title=&quot;&quot;&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;p class=&quot;caption&quot;&gt;Explora\u00e7\u00e3o - Paraty RJ&lt;\/p&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t&lt;\/li&gt;\n\t\t\t\t\t\t\t\t\t&lt;li&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;&lt;?=bloginfo(&#039;template_url&#039;)?&gt;\/slide\/slide_imagens\/img3.jpg&quot; width=&quot;800&quot; height=&quot;400&quot; alt=&quot;&quot; title=&quot;&quot;&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;p class=&quot;caption&quot;&gt;Paragua\u00e7u - MG&lt;\/p&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t&lt;\/li&gt;\n\t\t\t\t\t\t\t\t\t&lt;li&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;&lt;?=bloginfo(&#039;template_url&#039;)?&gt;\/slide\/slide_imagens\/img4.jpg&quot; width=&quot;800&quot; height=&quot;400&quot; alt=&quot;&quot; title=&quot;&quot;&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t\t&lt;a href=&quot;#&quot;&gt;&lt;p class=&quot;caption&quot;&gt;Varginha, a ET City&lt;\/p&gt;&lt;\/a&gt;\n\t\t\t\t\t\t\t\t\t&lt;\/li&gt;\n\t\t\t\t\t\t\t&lt;\/ul&gt;\n\t\t\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t\t&lt;\/div&gt;\n\n\t\t\t\t\t&lt;div id=&quot;box-esq-dois&quot;&gt;\n\t\t\t\t\t\tPublicidade\n\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t&lt;\/div&gt;\n\n\t\t\t\t&lt;div id=&quot;cont-inferior&quot;&gt;\n\t\t\t\t\t&lt;?php query_posts(&#039;showposts=3&#039;);?&gt;\n\t\t\t\t\t&lt;?php if(have_posts()): while(have_posts()) : the_post();?&gt;\n\t\t\t\t\t&lt;div id=&quot;box-post&quot;&gt;\n\t\t\t\t\t\t&lt;small&gt;&lt;?php the_time(&#039;| j M Y |&#039;);?&gt; &lt;?php if(function_exists(&#039;the_views&#039;)){the_views();}?&gt;&lt;\/small&gt;\n\n\t\t\t\t\t\t&lt;a href=&quot;&lt;?php the_Permalink()?&gt;&quot;&gt;&lt;img src=&quot;&lt;?php $key=&quot;topo_post&quot;;echo get_post_meta($post-&gt;ID,$key,true);?&gt;&quot;&gt;&lt;\/a&gt;\n\t\t\t\t\t\t&lt;div id=&quot;superior&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;h1&gt;&lt;a href=&quot;&lt;?php the_Permalink()?&gt;&quot; title=&quot;&lt;?php the_title();?&gt;&quot; alt=&quot;&lt;?php the_title();?&gt;&quot;&gt;&lt;?php the_title();?&gt;&lt;\/a&gt;&lt;\/h1&gt;\n\t\t\t\t\t\t\t\t&lt;p&gt;&lt;?php the_advanced_excerpt(&#039;length=60&#039;);?&gt;&lt;\/p&gt;\n\t\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t\t\t&lt;div id=&quot;inferior&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;div id=&quot;balao-post&quot;&gt;\n\t\t\t\t\t\t\t\t&lt;img src=&quot;&lt;?=bloginfo(&#039;template_url&#039;)?&gt;\/imagens\/balao.png&quot; width=&quot;35&quot; height=&quot;37&quot; alt=&quot;&quot; title=&quot;&quot;&gt;\n\t\t\t\t\t\t\t\t\t&lt;h1&gt;&lt;?php comments_popup_link(&#039;0&#039;,&#039;1&#039;,&#039;...&#039;);?&gt;&lt;\/h1&gt;\n\t\t\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t\t&lt;\/div&gt;\n\t\t\t\t\t&lt;?php endwhile; else:?&gt;\n\t\t\t\t\t&lt;?php endif;?&gt;\n&lt;?php wp_pagenavi();?&gt;\n\n\t\t\t\t&lt;\/div&gt;\n\t\t\t&lt;\/div&gt;\n\n\t\t\t&lt;div id=&quot;cont-direito&quot;&gt;&lt;!--In\u00edcio conte\u00fado direito--&gt;\n\n\t\t\t\t&lt;?php get_sidebar(); ?&gt;\n\n\t\t\t&lt;\/div&gt;&lt;!--Fim conte\u00fado direito--&gt;\n\n\t\t&lt;\/div&gt;&lt;!--fim estrutura--&gt;\n\t&lt;\/div&gt;&lt;!--fim corpo--&gt;\n\n&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n<p>Obrigado!<\/p>\n","protected":false},"template":"","class_list":["post-15907","topic","type-topic","status-closed","hentry","topic-tag-paginacao","topic-tag-paginas","topic-tag-wp_pagenavi"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15907","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15907\/revisions"}],"wp:attachment":[{"href":"https:\/\/pt.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}