Skip Navigation

[Resolved] Pagination shows where it is not needed

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

Problem: The pagination links I added to my View are showing up even if they are not needed.

Solution: Move the pagination shortcodes inside the wpv-found-items tags.

This support ticket is created 6 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
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 steffenR-2 6 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#629084
view_shortcodes.jpg
Pagination in view.jpg
pagination_settings.jpg

I am trying to set up a View with a Filter and Pagination enabled.

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

I expected to see "no Pagination" when i click "Videos" because there are just 6 and the Pagination is set to a maximum of 9 posts to show.

Instead, I got the "Next" (Weitere) Button while the View is showing only 6 posts?

#629283

Hi can you try the following troubleshooting steps?
- Check the Loop Output of this View. Is there any conditional HTML in this loop that may be hiding some elements? If so, then that is why the pagination system seems to be incorrect. The pagination system cannot know which elements will be hidden or shown by conditional HTML.
- If no conditional HTML is hiding elements in the results, please let me know what happens when you click "Weitere". Are additional posts shown, or is the next page of results empty?
- Your Toolset and WPML plugins are quite out of date. Can you update to the most recent versions of all Toolset and WPML plugins?
- Are the results the same if you activate a default theme like Twenty Seventeen and deactivate all plugins except Types and Views?

#629694
result.jpg
checkbox.jpg

Hi Cristian,

the Conditionals are only used to check if the posts have some customfields. No condition is hiding something:

[wpv-layout-start]
[wpv-items-found]  
	<!-- wpv-loop-start -->
	<wpv-loop>
	<div class="vc_col-lg-4 vc_col-sm-6 vc_col-xs-12">
		<div class="download-result">
		
			[wpv-conditional if="( $(wpcf-downloads-image) ne '' )"]
				<a href="[types field='downloads-image' output='raw'][/types]" target="_blank">
				[wpv-post-featured-image size="custom" width="360" height="200"]
				</a>         
				<!-- [mk_image src="[wpv-post-featured-image]" lightbox="true" image_size="360x200"  custom_lightbox="[types field='downloads-image' output='raw'][/types]" el_class="lightbox-true"] -->
			[/wpv-conditional]
          
			[wpv-conditional if="( $(wpcf-downloads-image) eq '' )"]
				<a href="[types field='pdf-upload-download'][/types]" target="_blank">
				[wpv-post-featured-image size="custom" width="360" height="200"]
				</a> 
			[/wpv-conditional]
						
			<div class="download-info">
				<div class="download-result-title"><span><p>[wpv-post-taxonomy type="download-rubrik" format="name"]: </p></span><h4> [wpv-post-title]</h4>
            	[wpv-post-excerpt]
              	</div>
            	<div>
					<a href="[types field='pdf-upload-download'][/types]" target="_blank">
						<img class="download-btn" src="/wp-content/uploads/2017/03/downloads.png"  >
					</a>
            	</div>
			</div>
                   
		</div>
	</div>  
	</wpv-loop>
	<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
	<div class="vc_col-sm-4">
      <div class="download-result">
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
      </div>
	</div>
[/wpv-no-items-found]
[wpv-layout-end]

[wpv-pagination]
<div class="clearboth"></div>  
[wpv-pager-prev-page force="false"] [wpml-string context="wpv-downloads"]next[/wpml-string][/wpv-pager-prev-page]
[wpv-pager-next-page force="false"][wpml-string context="wpv-downloads"]previous[/wpml-string] [/wpv-pager-next-page]
[/wpv-pagination]


If "Weitere" is clicked, the message "No entrys found" is shown.

After updating all Plugins and WordPress on Testserver: hidden link the Problem still exists.

After installing the default theme Twenty Seventeen on Testserver: hidden link and deactivating all plugins except Types and Views, the problem still exists. (see screenshots)

#629764

One more test: Please move the pagination shortcodes just below the wpv-loop-end comment so they are inside the wpv-items-found block, then test again. If this does not resolve the issue, I will need to take a closer look in wp-admin.

#630896

Hello Christian,

problem solved! Thx a lot for your support!!