Membership Plugin

WordPress Membership Plugin

  • Home
  • Documentation
  • Addons
  • Support
    • Quick Setup
    • Documentation
    • Premium Addon Support
    • Paid Support
    • Support Forum
    • Support Forum Search
    • Forum Login
    • Forum Registration
  • Contact

Searchable Member Fields

Simple Membership Plugin › Forums › Simple Membership Plugin › Searchable Member Fields

  • This topic has 5 replies, 3 voices, and was last updated 10 years, 11 months ago by peter.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • December 10, 2015 at 3:58 pm #4432
    peter
    Participant

    Hi I hope you can help.

    I have edited the following file:class.swpm-members.php

    And added the follwoing code:

    function get_columns() {
    return array(
    ‘cb’ => ‘<input type=”checkbox” />’
    , ‘member_id’ => SwpmUtils::_(‘ID’)
    , ‘user_name’ => SwpmUtils::_(‘Username’)
    , ‘first_name’ => SwpmUtils::_(‘First Name’)
    , ‘last_name’ => SwpmUtils::_(‘Last Name’)
    , ’email’ => SwpmUtils::_(‘Email’)
    , ‘company_name’ => SwpmUtils::_(‘Company’)
    , ‘address_city’ => SwpmUtils::_(‘City’)
    , ‘alias’ => SwpmUtils::_(‘Membership Level’)
    , ‘subscription_starts’ => SwpmUtils::_(‘Access Starts’)
    , ‘account_state’ => SwpmUtils::_(‘Account State’)
    );
    }

    function get_sortable_columns() {
    return array(
    ‘member_id’ => array(‘member_id’, true),//True means already sorted
    ‘user_name’ => array(‘user_name’, false),
    ’email’ => array(’email’, false),
    ‘alias’ => array(‘alias’, false),
    ‘company_name’ => array(‘alias’, false),
    ‘address_city’ => array(‘alias’, false),
    ‘account_state’ => array(‘account_state’, false),
    );
    }

    As you can see I have added company name and also address city.

    Can you advise how I make these fields show up in search results. I am happy to edit the correct section of code. Currently when I search for say ‘ACME’ then I get the feedback that no results have been found, but I have clearly added ACME as the company name for a member.

    Many thanks in advance.

    December 10, 2015 at 10:21 pm #4436
    mbrsolution
    Moderator

    Hi, are you trying to set up the search for custom fields added using the Form Builder Add-on under the Members tab?

    December 11, 2015 at 9:46 am #4461
    peter
    Participant

    No these are regular fields when adding a member.

    It seems that WordPress only comes with the ability to search the name and username. I have exapnded this slightly using a function, but I would really like to include the company name and also the city/town fields in my search.

    I have been able to add the fields to the mmeber view using the code above, but really would be ideal if these could also be searchable.

    I don’t have the Form Builder installed.

    December 11, 2015 at 11:43 pm #4468
    mbrsolution
    Moderator

    Hi, thank you for your request. The plugin developers will further into your request.

    December 13, 2015 at 12:57 am #4496
    admin
    Keymaster

    We have made a change so the the search feature in the members menu will search the company name, city, state, country fields also. This feature will be available in the next version.

    December 14, 2015 at 9:15 am #4516
    peter
    Participant

    Thanks for this.

    Do you have a date when this update will be released?

    Thanks

    Peter

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Log In

Please read this message before using our plugin.

Search

Featured Addons and Extensions

  • Membership Form Builder Addon
  • Member Directory Listing Addon
  • WooCommerce Payment Integration
  • Member Data Exporter Addon

Documentation

  • Documentation Index Page

Copyright © 2026 | Simple Membership Plugin | Privacy Policy