Bootstrap 4 page pagination (Bug?)

Hello.

I was wondering what is the correct approach to implement post pagination in post loop?
I was able before to use bootstrap 4 version but now I have bootstrap 5 and it doesn’t seem to show in wordpress. Not sure what the best solution is to make this work.
I would like to have prev and next button with a few page links in between.
Also does the pagination have to be within the post loop or can it be also outside it?

Just to be clear I am talking about the pagination to load next group of posts not the prev and next within single.php

I actually got it sorted out :slight_smile:

I am struggling too with Bootstrap 5 and Pinegrow pagination, maybe you remember how you sorted it out?

Yes I needed to add bootstrap 4 pagination and then also had to style it using css
This is the code I ended up with in the end:

<?php wp_bootstrap4_pagination( array( 'range' => '3' ) ); ?>

I’m using scss so I just styled these to my liking.
$pagination-border-radius:
$pagination-border-width:
$pagination-focus-bg:
$pagination-hover-color:
$pagination-hover-bg:

1 Like

thanks! But how you add bootstrap4 pagination in the bootstrap5 project?
Should I activate Bootstrap 4 also in Pinegrow, right now I habe BS5 activated only…
Where did you place your php code?

No you don’t have to add bootstrap 4 you just need to search pagination in wordpress actions and add it and make sure to have bootstrap 4 version in the settings of pagination

1 Like

yes this works thanks! Not sure why I didn’t try before… Pinegrow Team… maybe update that action for Bootstrap 5.

Thank you, this works with a Post Loop.
Rather the “The Loop” action with a custom query doesn’t work. it always keeps showing the first images on an attachment post type (image items from the media library). If I choos: show all posts in one page then I see all images from the library… so I will open a new item in this forum for that.
Normally you do pagination on posts or a custom query post, but attachment posts are not so populair :slight_smile:

Great to hear. Yes I agree, would be great to update accordingly with bootstrap version. And yes you have to add it within the loop forgot to mention that