Skip Navigation

[Closed] Load More option for Ajax Results

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 10 years ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 10:00 – 19:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+01:00)

This topic contains 17 replies, has 3 voices.

Last updated by Adriano 8 years, 2 months ago.

Assisted by: Caridad.

Author
Posts
#213682

Views 1.6 now has a fantastic Ajax Filter, how can we have a Load More button? for instance we set Limit of 9 results when filtering, but a Load More button to Load further results?

#213750

Dear Muhammad,

We dont have that feature included in Views yet, but I came across this post recently. I haven't has the chance to test it yet but it may help you:

hidden link

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#213751

I know about this snippet too but how can i integrate that with Views? I would appreciate it if you can point me to the right direction.

#213752

Oh sorry that was a different snippet, this one is for Views, i will test it and get back to you, Thanks.

#213753

Where do i include that JS Snippet and how do i call that function in 1.6? As there is an option for Calling JS.

#213785

If somehow you can make this work with ver 1.6 that willbe great, please let me know asap.

#214041

Dear Muhammad,

You need to set your view to have "No Pagination".

Copy and paste the javascript in the "JS editor" section of the View.

1) make sure that the main container hass a class="main_table"
2) add a link with the "load_more" class

For example:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
   <table width="100%" class="main_table">
      <tbody>
      <wpv-loop>
            <tr>
               <td>[wpv-post-link]</td>
            </tr>
      </wpv-loop>
   </tbody>
   </table>
   <a href="#load_more" class="load_more">Load more</a>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		[wpml-string context="wpv-views"]<strong>No items found</strong>[/wpml-string]
	[/wpv-no-items-found]
[wpv-layout-end]

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#214042

I have tried exactly like this but somehow it doesn't load more posts, i am using version 1.6

Have you tested it on your end?

#214066

Dear Muhammad,

Yes, I did. Can you provide a URL to the page?

Thanks
Caridad

#214068

Its the same old URL with Ajax Search page, oldurl.com/ajax-search

sorry on a mobile

#214069

Url updated.

#214083

Okay using your layout, i finally made the Load More option work, Thanks alot!

But date takes a long time to be selected and also the Ajax is loading late too.

#214086

Also, once you do the search, the load more button doesn't work, doesn't load more, it works only on all the posts loaded at first.

#214795

Dear Muhammad,

What I see is that the "load more" button is showing even if its not needed. For example, if we have less than 6 results, it should be hidden.

You can try showing the button like this:

[wpv-if evaluate="[wpv-found-posts]>6"]
<a href="#load_more" class="load_more">Load more</a>
[/wpv-if]

Please let me know if you are satisfied with my answer and if I can help you with any other questions you might have.

Regards,
Caridad

#214817

Hi,

But for instance when we use the filter and we have over 30 results, the button will show but the button will not work or it will show the results just like without using a filter?

Regards,
Shahzad

The topic ‘[Closed] Load More option for Ajax Results’ is closed to new replies.