Home › Types Community Support › [Resolved] Hide Pagination Text When Only One Page
Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 8:00 – 17:00 | 8:00 – 17:00 | 8:00 – 17:00 | 8:00 – 17:00 | 8:00 – 17:00 | - |
- | - | - | - | - | - | - |
Supporter timezone: America/Sao_Paulo (GMT-03:00)
Tagged: Paginated lists
Related documentation:
This topic contains 4 replies, has 2 voices.
Last updated by Adriano 9 years, 6 months ago.
Assisted by: Adriano.
Is there a way to hide the "extra" pagination text I have for my pagination (Page X of X) - meaning hide the "(Page" and "of" and ")" if the content gets filtered down so there's only one page? Everything works great in my view except for this. If the pagination is one page, I see "(Page of ). Is there any way to make this text get hidden the same way the "Previous" and "Next" text disappears when there's only one page?
Here's my code:
<p class="blog-nav-page">[wpv-pager-prev-page][wpml-string context="wpv-views"]Previous[/wpml-string][/wpv-pager-prev-page] [wpv-pager-current-page style="drop_down"][wpv-pager-next-page] [wpml-string context="wpv-views"]Next[/wpml-string][/wpv-pager-next-page]</p><p class="blog-nav-pageright">([wpml-string context="page"]Page[/wpml-string] [wpv-pager-current-page] [wpml-string context="of"]of[/wpml-string] [wpv-pager-num-page])</p>
Thanks!
Another idea as a solution would be to have the pagination show (Page 1 of 1) when it's only one page rather than have the page numbers disappear but the surrounding text remain. I have no idea how to do this but that would solve the problem. 🙂
That's possible using the View's GUI, see the attached image.
Thanks for pointing me in the right direction. I found that if I surround the entire code I posted above between [wpv-pagination][/wpv-pagination] it works perfectly (the pagination gets hidden if it's only one page). This added shortcode makes everything work right! 🙂
Nice! You are welcome.
The forum ‘Types Community Support’ is closed to new topics and replies.