metafizzy / isotope

:revolving_hearts: Filter & sort magical layouts
https://isotope.metafizzy.co
11.03k stars 1.42k forks source link

Isotope with pagination Next and Prev buttons #1634

Closed gaymemohamed closed 1 year ago

gaymemohamed commented 1 year ago

I used pagination with filter by isotope and i user next and prev buttons and work fine but the number of pages return all pages i want to return 5(1 2 3 45) pages then when i click next return (2 3 4 5 6), how can i do this. @desandro

https://i.im.ge/2022/08/30/OAe23c.Screenshot-2022-08-30-105516.png

gaymemohamed commented 1 year ago

How can i do like this screenshot. https://im.ge/i/OAejs9

thesublimeobject commented 1 year ago

@gaymemohamed — Hmm I think this is less of an Isotope question and more of a general programming question, but I will help you out best I can. Do you perhaps have some code that I can see, or a working example (per the contributing guidelines)? That would make it much easier to provide some assistance.

gaymemohamed commented 1 year ago

Hello @thesublimeobject, Thanks for replay, Here i want only one thing that the pagination not return all pages numbers, should return 5 pages when i press on next first page disappear and the six page appear, now i have all page numbers return in pagination box. like screenshot here : https://i.im.ge/2022/08/30/OAe23c.Screenshot-2022-08-30-105516.png but i want this screenshot with isotope : https://im.ge/i/OAejs9 or < 1 2 3 4 5 > when i press on next btn the result of pagination pages is < 2 3 4 5 6 > if you understand the issue please tell me, thanks.

thesublimeobject commented 1 year ago

@gaymemohamed — I'm sorry, I wish I could be more helpful, but without a working example it it very difficult. I need to see what code you have written and what you have tried in order to help more. If you want to add more details, I would be happy to take a look, but there's no way for me to guess based on just a few screenshots.

So once again, per the contributing guidelines, please submit a more comprehensive test case.

gaymemohamed commented 1 year ago

This codepen Link of code but not have preview @thesublimeobject , https://codepen.io/Gayme/pen/eYMqbey

thesublimeobject commented 1 year ago

@gaymemohamed — Okay, so just for the future, you can't just paste code at random into CodePen and expect it to work. This is Wordpress/PHP code, so it will not just automatically render as it doesn't have WP Core, plus whatever other plugins to draw from, which is why it isn't working.

Second, it looks like you're just generating the pagination on your own, not with anything related to Isotope, generally. That really makes this more of a Wordpress/Programming question than it is an Isotope question.

Lastly, you should look into Infinite Scroll—this is another plugin written by @desandro that integrates with Isotope and supports pagination. That said, it might need a bit of customization to work correctly with Wordpress (it's been awhile since I've used this in a Wordpress instance, but it's definitely do-able).

If you have any further questions I'd be happy to try to assist, but this is quite a lot of non-Isotope code to go through for a non-Isotope related issue. For any further questions (related to Isotope directly), perhaps try posting a simpler, reduced test case. Thanks!

gaymemohamed commented 1 year ago

Thanks for advice @thesublimeobject I will see it all.