I’m trying to do the same thing - create custom list templates. I made copies of the default list php template, and moved them to the wp-content folder with new names.
Then I started trying to edit the php (I’m not a coder, either).
My first goal is to filter the list so that only those members with a custom field checkbox that is checked will show.
My second goal is to show a larger avatar picture with their name and title (another custom field) below the picture, then with columns where a concatenated address (in a standard address block) would show and a link to a “Contact Me” form (maybe created with wp-forms?) so that I wouldn’t have to display the email address.
The address block would take the fields for the company and address and display them like this:
company name
address
city, state, zip-code
phone number
I have the shortcode that would drive the custom form:
[s2Member-List template=“s2_board-list.php” orderby=“board_member_ordering” order=“ASC” show_fields=“board_member_title, company_name, street_address, city, state, zip_code, phone_number, fax_number, business_type” /]
It’s accessing the correct list template, so I know I’ve got that right, but I cannot figure out how to filter the list by my custom “board_member” checkbox field to show only the records that have that checkbox checked.
I tried to tingker with the php by adding a litte section below the avatar and display name section to show the “board_member_title” field, but it’s not doing anything:
<?php $board_member_title = get_user_field('board_member_title'); ?>
<?php echo esc_html($_field_value = $board_member_title); ?>
It’s not doing anything - I can’t seem to figure out how to call specific fields in PHP. If I did, I’d be able to design a whole new layout. It’s just this one little thing I can’t get right and cannot find anywhere in the forum or help files that will guide me.
Hiring someone isn’t completely out of the question, but I’m already about 5 hours over what I was authorized to bill my client for, so any custom coding comes out of my pocket. I simply was not prepared for s2Member to require so much custom coding for simply displaying filtered lists in a custom view.
I also need to show a list of sponsors in order of sponsor level, showing the custom fields that apply to each level. I’ll need to design a custom form for that page, too. The shortcode is basically:
We appreciate our sponsors
Premier Corporate Sponsors:
[s2Member-List levels=“5” show_fields=“company_name, street_address, city, state, zip_code, phone_number, fax_number, business_type, business_description, logo_url, website_url” /]
(contact info, company profile, logo and website link)
Select Corporate Sponsors:
[s2Member-List levels=“4” show_fields=“company_name, street_address, city, state, zip_code, phone_number, fax_number, business_type, business_description, logo_url” /]
(contact info, company profile and logo)
First Class Corporate Sponsors:
[s2Member-List levels=“3” show_fields=“company_name, street_address, city, state, zip_code, phone_number, fax_number, business_type” /]
(contact info)
Non-Profit Sponsors:
[s2Member-List levels=“2” show_fields=“company_name, street_address, city, state, zip_code, phone_number, fax_number, business_type” /]
(contact info)
Any help the forum or support folks can provide will help me a lot!
Thank you,
Ernie