Skip to content

Instantly share code, notes, and snippets.

@Idealien
Created March 2, 2018 01:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Idealien/46f7f60aef7b2023218260e5a24171b5 to your computer and use it in GitHub Desktop.
Save Idealien/46f7f60aef7b2023218260e5a24171b5 to your computer and use it in GitHub Desktop.
Gravity Flow - Adjust Discussion Display Limit
<?php
add_filter( 'gravityflow_discussion_items_display_limit', 'limit_discussion_display', 10, 2 );
function limit_discussion_display( $display_limit, $discussion_field ) {
//Change to control which form / field the limit change is applied to
if ( $discussion_field['formId'] == '25' ) {
$display_limit = 2;
}
return $display_limit;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment