Skip Navigation

[Resolved] No pagination in a content template for displaying related posts

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

Last updated by Minesh 3 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2253481

Hi

I’m displaying related custom posts in a product view.
Basically I have set up a relationship between Products<->Projects.
In Products I’m displaying Projects that have relations with the Products.

I’m using for it dedicated Content Template that I’m inserting then via shortcode in my Products template via Blocksy Content block .([wpv-post-body view_template="product-used-in-projects”])

The biggest problem is that the pagination is not working at all. I’m always getting 10 results. Changing the number or setting Infinite scroll doesn’t work.

#2253929

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share problem URL where I can see the issue also the URL of the content template you build using Blocksy?

#2253941

Sure.
Here is the product url with projects below - hidden link
I've connected 48 projects to this product, they should be listed below the section "Użyliśmy tego produktu w tych projektach"

Here is the content template for the section responsible of displaying projects where particular product was used - hidden link

It's being used in Content Block from Blocksy - hidden link
Here are the details - hidden link

#2253985

Minesh
Supporter

Languages: English (English )

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

Are you using any hard caching as I try to change the number of results to display with pagination to 5 records only and saved the content template:
=> hidden link

But I do not see the change I made has any effect on frontend:
=> hidden link

I can still see 10 records. Can you please disable any of the cache if you are using.

#2253989

There is no cache plugin enabled. I had the same problem as you - changing the number of items or type of pagination is not being saved/shown at all.
In other views I don't have this problem - the other views are being used in a complete content template.

#2254061

Minesh
Supporter

Languages: English (English )

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

When I checked the page source for the following post: hidden link?

I see the following CSS added to the page source:

.wpv-pagination-nav-links-container {
	display: none !important;
}

I'm not sure who and why added the above CSS code as that CSS code is responsible for hiding the pagination.

#2254075

It's because I'm using infinity scroll in every view. Even when the infinity scroll is being used, the pagination controls are still being displayed - which is confusing.
But doesn't explain why cannot you save/show more/less than 10 projects in the view, right?

#2254079

Minesh
Supporter

Languages: English (English )

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

But doesn't explain why cannot you save/show more/less than 10 projects in the view, right?
==>
We do not recommend to use Toolset Blocks within the third party content build area. Rather you should try to build view in classic mode and then check if you see it working as expected.

#2254081

I don't understand - what do you mean in classic mode? How can i display then Toolset view below my Products?
For me it's a bug that need to be resolved, because I cannot display more than 10 items in this view

#2254089

Minesh
Supporter

Languages: English (English )

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

It seems the content template you created having some issues.

I've created another content template and created a new view that displays the same fields and 6 results per page:
=> hidden link
- You can modify the view and content template as per your requirement.

I've added the following CSS code to "Custom CSS and JS" section's "Custom CSS" box to override the CSS rule that hides the pagination. Now, it will display the pagination.

.wpv-pagination-nav-links-container {
display: block !important;
}

Then I've added the content template to Blocksy content block:
=> hidden link

[wpv-post-body view_template="projects-belongs-single-product"]

I can see its working here: hidden link

You can modify the view as per your requirement.