Skip Navigation

[Resolved] Pagination disappeared in some archives of custom post types

This thread is resolved. Here is a description of the problem and solution.

Problem:
Pagination disappeared in some archives of custom post types

Solution:

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/pagination-disappeared-in-some-archives-of-custom-post-types/#post-1965315

Relevant Documentation:
- https://toolset.com/course-lesson/creating-a-custom-archive-page/

This support ticket is created 3 years, 8 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
- 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 7 replies, has 2 voices.

Last updated by pattyS-2 3 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1963461

Hello,

I duplicated a site to a local server and tested some search plugins. After doing so and switching between Relevanssi and Ajax Search Pro one or two times, the pagination created by Views suddenly disappeared in the search result site, and in two archives of custom post types as well. Other cpt archives still work fine.
I was not changing anything in Views or Types or other Toolset settings before this happened, and I see no changes in the archive settings.
I deactivated all plugins except Types and Views, and switched to the Twenty Twenty-One theme, it still happens.

Thanks a lot for any help or hints,
Patty

#1964159

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please tell me with what archive you do not see pagination and share temporary admin access details so I can check whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1965121

Minesh
Supporter

Languages: English (English )

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

I tried to search "Band-Index" but I do not see maybe the name is different.

Can you please share the direct URL of the archive or view or page where you claim that pagination is not working or does not display?

#1965163

Hi Minesh,
oh, sorry, yes, this is the link to the archive:
hidden link
"bix-eintrag" is the correct name, "Band-Index" is the name in the menu.

#1965207

Minesh
Supporter

Languages: English (English )

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

Thank you for sharing the link.

I see on the page that the following CSS is added:

.pager, .pager li {
    display: none;
}

I'm not sure where you added the above CSS and the above CSS is the reason you do not see the pagination button as it hides the pagination.

Can you please adjust the above CSS or remove it as required and once you disable the above CSS code the pagination button you will be able to see.

#1965277

Thank you for finding this. Ok, I removed that CSS. Now, there is "Older Posts", this is added by the theme.
The other custom post type archives now have both paginations, "Older Posts" coming from the theme, and site numbers added by Views, like the reviews archive:
hidden link
The Band-Index does not show both paginations.

I prefer Views to generate the pagination as site numbers, I had added that CSS to hide the theme's "Older Posts". Not at all elegant, yes, but so far it worked, as Views uses "pagination" and "wvf-"something, to name classes or divs, not "pager" like the theme, fortunately.

Before I experimented with the search plugins, in all custom post types the Views pagination was generated. I have no idea what has changed now. Can you have a look again please?

#1965315

Minesh
Supporter

Languages: English (English )

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

Ok - I think I found the issue.

Please check now:
- hidden link

If I added the pagination code directly to the View's Loop Editor section instead of adding it using the shortcode: [wpv-pager-archive-nav-links output="bootstrap" reach="2"] , it works.

<div class="row">
	<div class="col-sm-3"></div>
	<div class="col-sm-9">[wpv-pager-archive-nav-links output="bootstrap" reach="2"]</div>
</div>

Then I checked the content template that displays the pagination:
=> hidden link

I see its assigned to many post types, it should not be assigned to any post type.

So you have two choice, either unassign the content template to all post types or add the code directly to views as shown above.

#1965343

Wow! everything works fine now, thank you Minesh! your solution saved me so much time, and your explination is totally helpful for better understanding how Views works! Thank You so much!