AnswerBun.com

Ajax load more button for comments wordpress

WordPress Development Asked by Trello on January 4, 2022

I have my own Ajax load more button system but for posts now i decide to make the same thing but for comments so after check get_comments i found that i can’t get the CURRENT page of comments like posts.

So anyone have any example to help me about this? Because comments is totally different than posts.

  • DON’T NEED ANY PLUGINS.

One Answer

Well, this question is old but still has no answer!

Here is a small solution for future visitors.

Implementing load more button for comments without plugins is simple enough:

  1. Create a button if comment pages are 2 and more
  2. Create a jQuery script that will process the button click event and passes the current comment page number to wp_ajax_ action hook
  3. The last step – is wp_ajax_ function that will process the AJAX request.

That's all!

But if you need the ready code, please look at this tutorial https://rudrastyh.com/wordpress/load-more-comments.html

Answered by Misha Rudrastyh on January 4, 2022

Add your own answers!

Related Questions

Style WooCommerce Product Search Widget

0  Asked on December 19, 2020 by chirlet-deusa

     

Role – edit page but not publish

1  Asked on December 15, 2020 by miri-ull

   

How to create a breadcrumb for pages?

3  Asked on December 13, 2020 by msrajjc2

 

Weird issue with is_pages() with array

0  Asked on December 11, 2020 by birdseyedesign

 

WP_Query will not display draft posts

4  Asked on December 11, 2020 by ben-racicot

   

Flickity slider on WordPress: Modify behaviour

1  Asked on December 11, 2020 by vicdilu

 

Add the same content to multiple pages

1  Asked on December 10, 2020

   

Understanding WordPress(framework?) Web Development

2  Asked on December 10, 2020 by anuj-kaithwas

 

How to use value from modal tinymce windowManager?

1  Asked on December 10, 2020 by patrick-paul

   

wp_editor() renders outside wrapping div

0  Asked on December 9, 2020

 

WP REST API: Order posts by meta value (acf)?

2  Asked on December 9, 2020 by mauro-bringolf

       

How to incluide custom field in WooCommerce email using placeholder

0  Asked on December 8, 2020 by santiago-cuartas-rmrz

 

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP