Skip Navigation

[Résolu] Standard Pagination Code Not Working

This support ticket is created Il y a 5 années et 2 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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+01:00)

Marqué : ,

This topic contains 6 réponses, has 2 voix.

Last updated by mikeC-5 Il y a 5 années et 2 mois.

Assisted by: Nigel.

Auteur
Publications
#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: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01: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: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01: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: Anglais (English ) Espagnol (Español )

Timezone: Europe/London (GMT+01: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!

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