• I currently have this code on my ‘member directory’ page:

    [php] if(!empty($_REQUEST[‘s2-s’])): [/php]
    [s2Member-List enable_list_search=”yes” show_fields=”School District:school_district,Email:Email, Position Title:position_title,Work Email:work_email,Contact Number:contact_number,” limit=”30″ /]
    [php] endif; [/php]

    I can search everything fine, the problem is I’d like this directory to already populate the list and not require me to have to search before seeing the list of members

    https://wordpress.org/plugins/s2member/

Viewing 7 replies - 1 through 7 (of 7 total)
  • How about just putting in a [s2Member-List /] between [/php] and [s2Member-List enable ... ?

    Thread Starter thedert

    (@thedert)

    [s2Member-List /] is already included within the snippet

    I get that. But you say it’s not populating the list with the other attributes. So I suggested just using the basic shortcode first to generate the list.

    Thread Starter thedert

    (@thedert)

    Gotcha. Only issue with that is it will display full list and then a search result on top of that.

    Yes, I understand it’s not ideal. Another thing that strikes me now that I consider this again is whether listing the attributes in a different order might work better. I know that some shortcodes are really sensitive to the order of attributes, though I don’t know if this one is.

    @thedert Try to put initial “[s2Member-List /]” in a “div”, then use JS to find if the shortcode with the search function shows something. If shows, hide the initial one. So if not search results shown, initial one will be there. This may need both [s2If], JS and PHP code, tough.

    Thread Starter thedert

    (@thedert)

    @krumch good suggestion! I will try it out and return with results

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Display memberlist’ is closed to new replies.