Skip Navigation

[Resolved] Standard Pagination Code Not Working

This support ticket is created 5 years, 9 months ago. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 6 replies, has 2 voices.

Last updated by mikeC-5 5 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1196393

I am trying to:
Put next/previous pagination in a blog view. This is the code that I am using. It is standard code from a template View that I import regularly:

<ul class="pagination">
 <div id="previous"><li class="page-item">[wpv-pager-prev-page force="true"][wpml-string context="wpv-views"]Previous[/wpml-string][/wpv-pager-prev-page]</li></div>
	<div id="next"><li class="page-item">[wpv-pager-next-page force="true"][wpml-string context="wpv-views"]Next[/wpml-string][/wpv-pager-next-page]</li></div>
</ul>

Link to a page where the issue can be seen:
hidden link

I expected to see:
This code has worked fine on a number of other sites.

Instead, I got:
The links aren't active.

#1196495

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Mike

First thing to do would be to check if something else on the site is interfering.

That means disabling all non-Toolset plugins and switching theme to twentynineteen or similar.

Do the pagination links work? If so it should be possible to identify a conflict by a process of elimination.

Let me know the results.

#1196965

I used the 2015 theme and tried deactivating all plugins except for Toolset Types & Views. Same issue.

That code is correct, right? It's the same code I've used a bunch of times.

Could this be an issue with the PHP version?

#1197118

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

The markup looks correct, yes, the only thing you seem have edited is to add div's which wouldn't affect anything.

PHP version also looks fine.

Could you check your PHP logs to see if anything is reported?

For some reason the full markup of the links isn't being generated, only the text inside a span instead of the actual link.

If nothing shows in the logs, I'd better get a copy of the site so that I can do some testing locally.

hidden link

Let me set up a private reply in case you have a copy to share.

#1197761

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Mike

When you insert the prev/next pagination controls there is an option to show them on the first and last pages even when not needed (it adds an attribute force="true" to the shortcodes).

So on the first page, the prev link will be disabled, it will just show the text, but it won't be a link.

That is happening in your View for both the prev and next links, because...

You have added a limit=3 setting to the View, and the pagination settings are set to display 7 posts per page.

Because there can only be 3 results in total (due to your limit setting) there is never another page to paginate to, hence text is displayed instead of links.

#1197862

LOL that did it. I feel dumb now, I should have checked. Thank you!

#1197865

My issue is resolved now. Thank you!