{"id":14264,"date":"2013-05-15T02:02:25","date_gmt":"2013-05-15T02:02:25","guid":{"rendered":"https:\/\/es.wordpress.org\/support\/topic\/problema-con-el-paginado-de-una-plantilla\/"},"modified":"2016-08-06T00:19:21","modified_gmt":"2016-08-06T00:19:21","slug":"problema-con-el-paginado-de-una-plantilla","status":"closed","type":"topic","link":"https:\/\/es.wordpress.org\/support\/topic\/problema-con-el-paginado-de-una-plantilla\/","title":{"rendered":"Problema con el paginado de una plantilla"},"content":{"rendered":"<p>Hola,<\/p>\n<p>Estoy editando una p\u00e1gina con una plantilla personalizada. En esta plantilla quiero mostrar una serie de posts de una categoria en concreto.<\/p>\n<p>Hasta ah\u00ed todo correcto, funciona y me muestra los posts que le indico de esa categor\u00eda.<\/p>\n<p>Para hacer el paginado utilizo la funci\u00f3n \u00abwp_corenavi\u00bb. Le indico que me muestre un n\u00famero de posts inferior al que tiene la categor\u00eda y corenavi me muestra las p\u00e1ginas y los iconos de forma correcta. Pero cuando pulso sobre el n\u00famero de una p\u00e1gina o en siguiente, en la URL que aparece en el navegador muestra que avanza: \u00ab\/page\/2\/\u00bb,\u00bb\/page\/3\/\u00bb&#8230;, pero me sigue mostrando las mismas entradas y en corenavi el \u00abcurrent\u00bb se mantiene en la p\u00e1gina 1.<\/p>\n<p>(Corenavi lo utilizo tambi\u00e9n en el index.php y funciona de forma correcta)<\/p>\n<p>Pego el c\u00f3digo de la p\u00e1gina que es bastante corto:<\/p>\n<pre><code>&lt;?php\n\/*\nTemplate Name: Tema de ejemplo\n*\/\nget_header();\n?&gt;\n\n&lt;div id=&quot;post-theme&quot;&gt;\n\n\t&lt;div id=&quot;post-content&quot;&gt;\n\t\t&lt;?php query_posts(array(&#039;posts_per_page&#039;=&gt; 2,&#039;cat&#039;=&gt; 3 )); ?&gt;\n\t\t&lt;?php while (have_posts()) : the_post(); ?&gt;\n\t\t\t&lt;h2 class=&quot;title-c&quot;&gt;\n\t\t\t&lt;p&gt;&lt;?php the_time(&#039;j&#039;); ?&gt; de &lt;?php the_time(&#039;F, Y&#039;); ?&gt;&lt;\/p&gt;\n\t\t\t\t&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Link a &lt;?php the_title(); ?&gt;&quot;&gt;\n\t\t\t\t&lt;?php the_title(); ?&gt;\n\t\t\t\t&lt;\/a&gt;\n\t\t\t&lt;\/h2&gt;\n\t\t&lt;?php endwhile;?&gt;\n\t&lt;\/div&gt;\n\n\t&lt;?php if (function_exists(&#039;wp_corenavi&#039;)) wp_corenavi(); ?&gt;\n&lt;\/div&gt;\t\n\n&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n<p>Gracias por cualquier soluci\u00f3n o consejo.<\/p>\n","protected":false},"template":"","class_list":["post-14264","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/14264\/revisions"}],"wp:attachment":[{"href":"https:\/\/es.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=14264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}