Skip to content

Commit

Permalink
fix: pagination missing & limited to three pages
Browse files Browse the repository at this point in the history
  • Loading branch information
HardeepAsrani committed Feb 5, 2024
1 parent 66c01d6 commit 1acfa9a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
13 changes: 12 additions & 1 deletion templates/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- /wp:group -->

<!-- wp:group {"style":{"spacing":{"padding":{"top":"64px","bottom":"64px","right":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"},"blockGap":"0px"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:64px;padding-right:0px;padding-bottom:64px;padding-left:0px"><!-- wp:query {"queryId":1,"query":{"perPage":3,"pages":"3","offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:64px;padding-right:0px;padding-bottom:64px;padding-left:0px"><!-- wp:query {"queryId":1,"query":{"perPage":3,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
<div class="wp-block-query alignwide"><!-- wp:post-template -->
<!-- wp:post-featured-image {"isLink":true} /-->

Expand All @@ -20,6 +20,17 @@
<!-- /wp:group -->
<!-- /wp:post-template -->

<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"64px","bottom":"64px"}}}} -->
<div class="wp-block-group alignwide" style="margin-top:64px;margin-bottom:64px">
<!-- wp:query-pagination {"textColor":"ti-fg","layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-numbers /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:group -->

<!-- wp:query-no-results -->
<!-- wp:paragraph {"align":"center","placeholder":"Add text or blocks that will display when a query returns no results.","backgroundColor":"ti-bg-inv","textColor":"ti-fg-alt"} -->
<p class="has-text-align-center has-ti-fg-alt-color has-ti-bg-inv-background-color has-text-color has-background">No Posts were found</p>
Expand Down
13 changes: 12 additions & 1 deletion templates/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1 class="wp-block-heading has-text-align-center">Search results</h1>

<!-- wp:group {"style":{"spacing":{"padding":{"top":"64px","bottom":"64px","right":"0px","left":"0px"},"margin":{"top":"0px","bottom":"0px"},"blockGap":"0px"}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group" style="margin-top:0px;margin-bottom:0px;padding-top:64px;padding-right:0px;padding-bottom:64px;padding-left:0px"><!-- wp:group {"align":"wide","style":{"spacing":{"blockGap":"40px","margin":{"top":"0px","bottom":"0px"}}},"layout":{"type":"constrained"}} -->
<div class="wp-block-group alignwide" style="margin-top:0px;margin-bottom:0px"><!-- wp:query {"queryId":1,"query":{"perPage":3,"pages":"3","offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
<div class="wp-block-group alignwide" style="margin-top:0px;margin-bottom:0px"><!-- wp:query {"queryId":1,"query":{"perPage":3,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":true},"displayLayout":{"type":"flex","columns":3},"align":"wide"} -->
<div class="wp-block-query alignwide"><!-- wp:post-template -->
<!-- wp:post-featured-image {"isLink":true} /-->

Expand All @@ -18,6 +18,17 @@ <h1 class="wp-block-heading has-text-align-center">Search results</h1>
<!-- wp:post-title {"level":3,"isLink":true} /-->
<!-- /wp:post-template -->

<!-- wp:group {"align":"wide","style":{"spacing":{"margin":{"top":"64px","bottom":"64px"}}}} -->
<div class="wp-block-group alignwide" style="margin-top:64px;margin-bottom:64px">
<!-- wp:query-pagination {"textColor":"ti-fg","layout":{"type":"flex","justifyContent":"space-between"}} -->
<!-- wp:query-pagination-previous /-->

<!-- wp:query-pagination-numbers /-->

<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination --></div>
<!-- /wp:group -->

<!-- wp:query-no-results -->
<!-- wp:paragraph {"align":"center","placeholder":"Add text or blocks that will display when a query returns no results.","backgroundColor":"ti-bg-alt"} -->
<p class="has-text-align-center has-ti-bg-alt-background-color has-background">No Posts were found</p>
Expand Down

0 comments on commit 1acfa9a

Please sign in to comment.