Skip Navigation

[Resolved] Archive for Custom Post Type & Pagination 404 & GeneratePress AJAX-Load-More

This support ticket is created 6 years 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by Maurice 6 years ago.

Assisted by: Christian Cox.

Author
Posts
#1206190

Hello,
I'm using GeneratePress Premium and made a WordPress-Archive for a Custom Post Type with Toolset.
The posts are shown correctly under .../site/the-slug/ and the Pagination from Toolset is working.

But only with "?wpv_view_count=21" at the end.

[.../site/the-slug/page/2/?wpv_view_count=21] works.
[.../site/the-slug/page/2/] gives 404 not found.

Is there any way to get page 2 on it's URL without that [?bla=ugly]?

And since GeneratePress comes with it's own AJAX Load More, it would be nice if that would work too.

#1206215

I checkmarked the debug thingy and getting this now:

Notice: A non well formed numeric value encountered in F:\xampp\htdocs\wordpress\wp-content\plugins\wp-views\embedded\inc\wpv-query-debug.class.php on line 382

New threads created by Christian Cox and linked to this one are listed below:

https://toolset.com/forums/topic/php-notice-when-using-views-debug/

#1206455

Hi, regarding the URL parameter ?wpv_view_count=x, it's generally not a good idea to remove this or try to manipulate it manually because Views and WP Archives use these URL parameters internally. However, the direct URLs without URL parameters should work correctly without generating 404s. That sounds like something we need to investigate in more detail. Can you try these troubleshooting steps first?
- Temporarily switch to Twenty Nineteen theme and deactivate all plugins except Types and Views.
- Update to the latest versions of Types and Views.
- Resave your site permalinks.
- Test again and let me know the results. If the problem is resolved, reactivate your theme and other plugins one by one until the problem returns.

Please let me know the results of these tests.

I'd like to investigate the PHP notice separately, so I have split that into a different ticket to keep things organized. I'll follow up with you there shortly. Thanks for understanding.

#1207197

Hey there,

+ I'm using now Twenty Nineteen, no other plugins activated and the permalinks are set to /%postname%/ only.
+ Homepage is a static page, my blog is on the static page called blog and pagination is working there. With 1 article per site.

+ I can see the custom archive on /site/the-slug/
- One Custom Post is listed and two paginations. The one from WordPress and one from Views
- [.../site/the-slug/page/2/?wpv_view_count=21] and [.../site/the-slug/page/2/] now both giving 404s
- AJAX Pagination is working, but F5 to refresh /page/2/?wpv_view_count=21 brings 404

Loop-Editor from the Archive

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<table width="100%" class="wpv-loop js-wpv-loop">
	<wpv-loop wrap="3" pad="true">
		[wpv-item index=1]
		<tr>
			<td>
				[wpv-post-body view_template="loop-item-in-xxx"]
			</td>
		[wpv-item index=other]
			<td>
				[wpv-post-body view_template="loop-item-in-xxx"]
			</td>
		[wpv-item index=3]
			<td>
				[wpv-post-body view_template="loop-item-in-xxx"]
			</td>
		</tr>
		[wpv-item index=pad]
			<td></td>
		[wpv-item index=pad-last]
			<td></td>
		</tr>
	</wpv-loop>
	</table>
	<!-- wpv-loop-end -->
<ul class="pagination">
	<li class="page-item">[wpv-pager-archive-prev-page][wpml-string context="wpv-views"]Previous[/wpml-string][/wpv-pager-archive-prev-page]</li>
	<li class="page-item">[wpv-pager-archive-next-page][wpml-string context="wpv-views"]Next[/wpml-string][/wpv-pager-archive-next-page]</li>
</ul>
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]
#1207209

Toolset -> Edit Post Type -> The Custom Post Type -> Pages was unchecked...