• Resolved davereed

    (@davereed)


    I need to allow users to click back through pages of past comments. I see where the functions.php file sets the number of comments displayed to 10. Can you help me understand how to add pagination?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Alessandro Tesoro

    (@alessandrotesoro)

    Hi @davereed

    Adding pagination for comments within profiles is not a simple task that can be easily explained here in a few lines. This is currently a feature on my to-do list that I plan to add very soon.

    At the moment the only adjustment you could do, is use the filter to increase the amount of comments displayed within the profile page. Let me know if you wish to do that and I can provide you a snippet.

    Thread Starter davereed

    (@davereed)

    Hi Alessandro, yes, please share that snippet. Do you have a timeline for when that might be added?

    Thanks again!

    Plugin Contributor Alessandro Tesoro

    (@alessandrotesoro)

    Hi @davereed

    This code should work, add it to your theme’s functions.php and adjust the number in there as you wish.

    
    add_filter(
    	'wpum_get_comments_for_profile',
    	function ( $args ) {
    		$args['number'] = 100;
    		return $args;
    	}
    );
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Paginate comments’ is closed to new replies.