{"id":86408,"date":"2015-09-24T18:45:46","date_gmt":"2015-09-24T16:45:46","guid":{"rendered":"https:\/\/nl.wordpress.org\/support\/topic\/paginering-van-het-archief-geeft-een-404\/"},"modified":"2016-08-05T02:14:03","modified_gmt":"2016-08-05T02:14:03","slug":"paginering-van-het-archief-geeft-een-404","status":"publish","type":"topic","link":"https:\/\/nl.wordpress.org\/support\/topic\/paginering-van-het-archief-geeft-een-404\/","title":{"rendered":"Paginering van het archief geeft een 404"},"content":{"rendered":"<p>He allen,<\/p>\n<p>Momenteel loop ik tegen een erg gek probleem aan. Op mijn archief pagina&#8217;s probeer in een paginering toe te voegen, echter geeft deze een 404 error. <\/p>\n<p>In onderstaand voorbeeld gebruik in een hoofdcategorie &#8216;Nieuws&#8217; en een aantal subcategorie\u00ebn.<\/p>\n<pre><code>if ($paged) : ?&gt;\n    &lt;nav class=&quot;page-nav archive&quot;&gt;\n\n        &lt;?php if ($prev = get_previous_posts_link()) : ?&gt;\n            &lt;div class=&quot;alignleft&quot;&gt;\n                &lt;span class=&quot;fo icons-angle-circled-left&quot;&gt;&lt;\/span&gt;\n                &lt;span&gt;&lt;?php previous_posts_link( &#039;Nieuwe berichten&#039; ); ?&gt;&lt;\/span&gt;\n            &lt;\/div&gt;\n        &lt;?php endif;\n\n        if ($next = next_posts($listPosts-&gt;max_num_pages, false)) : ?&gt;\n            &lt;div class=&quot;alignright&quot;&gt;\n                &lt;span&gt;\n                    &lt;a href=&quot;&lt;?= $next; ?&gt;&quot;&gt;Oudere berichten&lt;\/a&gt;\n                &lt;\/span&gt;\n                &lt;span class=&quot;fo icons-angle-circled-right&quot;&gt;&lt;\/span&gt;\n            &lt;\/div&gt;\n        &lt;?php endif; ?&gt;\n\n    &lt;\/nav&gt;\n&lt;?php endif; ?&gt;<\/code><\/pre>\n<p>De volgende pagina is <code>&#039;\/mvo-nieuws\/page\/2&#039;<\/code>. Maar die wordt dus helaas niet gevonden.<br \/>\nMijn permalink settings zijn <code>&#039;\/%category%\/%postname%\/&#039;<\/code>.<\/p>\n<pre><code>$cat = get_query_var(&#039;cat&#039;);\n$category = get_category($cat);\n\n$paged = (get_query_var(&#039;paged&#039;)) ? get_query_var(&#039;paged&#039;) : 1;\n$listArgs = array(\n    &#039;cat&#039; =&gt; $category-&gt;term_id,\n    &#039;paged&#039; =&gt; $paged,\n    &#039;posts_per_page&#039; =&gt; 11\n);\n\n$listPosts = new WP_Query($listArgs);\n\nwhile ($listPosts-&gt;have_posts()) :\n    $row++;\n    $listPosts-&gt;the_post();\nendwhile;<\/code><\/pre>\n<p>Als ik naar dit probleem Google krijg ik allemaal topics van 3-6 terug die erg outdated zijn. Dus hopelijk kan iemand mij hiermee helpen!<\/p>\n","protected":false},"template":"","class_list":["post-86408","topic","type-topic","status-publish","hentry","topic-tag-586","topic-tag-archive","topic-tag-category","topic-tag-pagination","topic-tag-paginering"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/86408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/86408\/revisions"}],"wp:attachment":[{"href":"https:\/\/nl.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=86408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}