Pagination Not Working
- webmasterbslnlParticipant4 years, 2 months ago #21494
I noticed the same problem using WPSOLR’s Ajax search template. Pagination button ‘1’ links to &page=0. PM me if you need a demo.
duckParticipant2 years, 6 months ago #29492Pagination is currently showing the next page highlighted in the pagination instead of the current page. When on page 1 it highlights and turns the text red for page 2. Page 2 shows 3 in red and so on. I tried changing the twig template and either introduced a negative number or a 0 but the identification was still never on the correct page.
Also, the page does not go back to the top of the page when switching to the next pagination page. Is this normal behavior or is it supposed to go back to the top of the page?
duckParticipant2 years, 6 months ago #29493I was able to fix the incorrect pagination identifier by changing this line:
<a class=”paginate {{ (page == pages.current_page) ? ‘active’ : ” }}”
to:
<a class=”paginate {{ (page == pages.current_page -1) ? ‘active’ : ” }}”Is there a way to turn off ajax pagination so that the page will reload at the top on the next page? So that the user does not need to scroll back up each time.
wpsolrKeymaster2 years, 6 months ago #29499Ajax pagination is triggered on css selector ‘a.page-numbers,a.paginate’.
You can set it up differently on the “Theme” add-on, with a non-existing selector for instance. Or change the twig template’s<a class="paginate" ... >
to something else.- This reply was modified 2 years, 6 months ago by wpsolr.
You must be logged in to reply to this topic.