Simple Membership Plugin › Forums › Simple Membership Plugin › Change Default Number Of Viewable Members
- This topic has 12 replies, 3 voices, and was last updated 10 years, 2 months ago by
Anonymous.
-
AuthorPosts
-
March 7, 2016 at 4:03 pm #5710
Anonymous
InactiveI would like to change the default number of viewable members from 10 to 200. Is this something I can do via the functions.php file in my theme, and if so could you please tell me what the coding would be – or is there another way.
Many thanks.
March 7, 2016 at 9:49 pm #5720mbrsolution
ModeratorHi, thank you for your suggestion. The plugin developers will investigate further your request.
March 8, 2016 at 2:23 am #5737Anonymous
InactiveThis is the code I was using with the Membership2Pro plugin. Perhaps it might help.
/* M2P All Members only shows 20 per page. Increase to 100 */
add_filter( ‘ms_helper_listtable_member_items_per_page’, ‘ms_helper_listtable_member_items_per_page_cb’ );
function ms_helper_listtable_member_items_per_page_cb( $per_page ) {
return 100;
}/* M2P Billing only shows 20 per page. Increase to 100 */
add_filter( ‘invoice_per_page’, ‘ms_billing_entries_per_page’ );
function ms_billing_entries_per_page( $per_page ) {
return 200;
}March 8, 2016 at 4:29 am #5742admin
KeymasterWe have added the following filter in the plugin that you will be able to customize the number of items in the members menu:
swpm_members_menu_items_per_page
This will be available in the next release of the plugin.
March 8, 2016 at 12:30 pm #5748Anonymous
InactiveThank you. This is a start. I added
/* Simple Membership only shows 10 per page. Increase to 200 */
add_filter ( ‘swpm_members_menu_items_per_page’ );
function swpm_members_menu_items_per_page( $per_page ) {
return 200;
}but am getting the following error:
Missing argument 2 for add_filter(), called in /home/connect/public_html/wp-includes/plugin.php on line 114 and defined in /home/connect/public_html/wp-includes/plugin.php on line 103
March 8, 2016 at 9:12 pm #5756mbrsolution
ModeratorHi the plugin has not been updated yet. This is due in the next release, that is why you are receiving the error you mentioned above.
Regards
March 8, 2016 at 9:14 pm #5757Anonymous
InactiveThank you. I realize that the plugin isn’t updated yet. I would just like to be able to add the code to my functions.php file rather than having to wait for the next version. I was wondering what code I need to use.
March 8, 2016 at 10:08 pm #5765mbrsolution
ModeratorYes I understand but without the filter added yet you can’t create the function. The plugin developers will reply to this request.
Thank you
March 8, 2016 at 10:13 pm #5767Anonymous
InactiveThanks again! I’ll wait. π
March 10, 2016 at 10:07 am #5806mbrsolution
ModeratorHi, have you tested the latest version? This has been upgraded and the filter added π
Thank you
March 10, 2016 at 1:55 pm #5811Anonymous
InactiveThank you so much!!!! This is great but I can’t find an option for changing the number of items shown. I assume this may come in future versions, and for now you have just changed it in the back end.
It appears to have increased from 10 to 50 which is a huge improvement but I’d like to change it to 200. I wasn’t able to find where I make that change. Can you please tell me the relevant file.
Again, thanks so much!
March 15, 2016 at 11:37 pm #5887mbrsolution
ModeratorHi, please read the following instructions. The instructions shows you how to add a filter to increase the number of view-able members.
March 16, 2016 at 12:28 am #5893Anonymous
InactiveI ended up starting again from scratch. Am not importing any members. Will have them register themselves but right now I just have me so canβt really test it, but I did add it to my functions.php in child theme. Thank you so much.
So far I am loving the plugin. Going to test it soon. Am optimistic that it is going to work great. I’ll let you know.
-
AuthorPosts
- You must be logged in to reply to this topic.