Skip Navigation

[Résolu] Show last page of view first

This support ticket is created Il y a 3 années et 4 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 5 réponses, has 3 voix.

Last updated by davidS-53 Il y a 3 années et 4 mois.

Assigned support staff: Minesh.


Say I have a view that has three pages.

Page 1: 10 items
Page 2: 10 items
Page 3: 4 items.

When the view is first loaded, I want to show the last page- ie. page 3, with it's 4 items. Reversing the sort order won't work because I only want the 4 items on the first page.

I don't seem to be able to find anything in the documentation to work out how to do this?

I have a couple of possible solutions, but wanted to check that i'm not missing anything obvious first. I was thinking of using JQuery to trigger a click on a pagination "Last Page" link, or pulling the last page number using [wpv-pager-total-pages] and using that to update the url parameter &wpv_paged=

Is there a better way to achieve the same result? Cheers!



Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I see both possibility, so I suggest you should try to grab the last page link and redirect the user on last page that would be the easy way to fix this.


Here's the JS i'm using if anyone needs it:

if ( $("body").hasClass("page-id-12345") ) {

		var oldurl = window.location.href;
		var arr = oldurl.split('?');
		var newurl = '<em><u>hidden link</u></em>'.wpv-filter-last-link').attr("href");

		if ( arr.length > 1 && arr[1] !== '' ) {
			// Do nothing- parameters exist.
		} else {
			window.location.replace( newurl );


Luo Yang

Languages: Anglais (English ) Chinois simplifié (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for sharing the JS workaround, that will help other users.



Languages: Anglais (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for sharing the solution. Please feel free to mark resolve this ticket 🙂


My issue is resolved now. Thank you!