Skip Navigation

[Resolved] Hide Pagination Text When Only One Page

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

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)

This topic contains 4 replies, has 2 voices.

Last updated by Adriano 9 years, 6 months ago.

Assisted by: Adriano.

Author
Posts
#247297

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!

#247543

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. 🙂

#247553
pagination_settings.png

That's possible using the View's GUI, see the attached image.

#247566

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! 🙂

#247569

Nice! You are welcome.

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.