pagination with Block querry loop don’t show the page
-
Hello everyone,
I have a wordpress installation, with no active plugin. I’m using the ‘triangulate’ theme (built with blocks) and the gutenburg editor.
On one of the pages, I want to display posts from 2 separate categories. To do this, I’ve used the ‘querry loop’ block. It displays the posts correctly, but I’ve had to add the pagination.
The pagination correctly displays the number of pages and links (I tested this by reducing the number of posts displayed and the number of pages evolves in line with the number of posts displayed and those created).
on the other hand, if each page number or arrow has a link of the type ‘https:////?query-28-page=2’ and are all different (page 3 has ‘3’ etc.) But if I click on a page number or arrow, the page reloads and always displays only the first 3 posts.
This is what is displayed in ‘code editor’ mode :<!-- wp:paragraph -->
<p>juste une test page, sorte de sandbox</p>
<!-- /wp:paragraph -->
<!-- wp:query {"queryId":28,"query":{"perPage":"3","pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false,"taxQuery":{"category":[42,29,25]}},"metadata":{"categories":["posts"],"patternName":"core/query-small-posts","name":"Petite image et titre"}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:columns {"verticalAlignment":null} -->
<div class="wp-block-columns"><!-- wp:column {"verticalAlignment":"center","width":"25%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:25%"><!-- wp:post-featured-image {"isLink":true,"aspectRatio":"4/3","height":"120px"} /--></div>
<!-- /wp:column -->
<!-- wp:column {"verticalAlignment":"center","width":"75%"} -->
<div class="wp-block-column is-vertically-aligned-center" style="flex-basis:75%"><!-- wp:post-title {"level":3,"isLink":true} /-->
<!-- wp:post-excerpt {"moreText":"Lire la suite"} /--></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->
<!-- /wp:post-template -->
<!-- wp:query-pagination {"paginationArrow":"chevron","fontSize":"small","layout":{"type":"flex","justifyContent":"center"}} -->
<!-- wp:query-pagination-previous {"fontSize":"small","fontFamily":"inter"} /-->
<!-- wp:query-pagination-numbers {"fontFamily":"inter"} /-->
<!-- wp:query-pagination-next {"fontSize":"small","fontFamily":"inter"} /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:query -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->Can you tell me what is causing this behaviour? Have I used the pagination block incorrectly?
Thanks
- You must be logged in to reply to this topic.