WordPress.org

Ready to get started?Download WordPress

Forums

BP Profile Search
[resolved] Searching custom extende profile fields on custom page (3 posts)

  1. sumit784
    Member
    Posted 11 months ago #

    Hi,
    First of all a very big thanks for making such a great plugin. I have been searching exactly this for a long time now.
    Keep up the good work.

    Now, the question I want to ask is very much relate to your plugin.
    Actually, I have created a custom template for the members page of my website and I am using this plugin on this page.
    Now, for the default members list shown on this page at the intial load; I want to add a custom query to search only the members who have selected "yes" in one of the custom extended profile field. But currently I am using "bp_has_members( 'type=alphabetical' ) " and then checking for the profile field like " bp_member_profile_data( 'field=xyz' )" .

    I have read that this adds a new database query for every single profile data lookup.

    so, I have dug into the code of your plugin and could see that you are firing a cutom sql query to fetch the required user data based on the filters.

    Can you help me suggesting a custom sql query for my requirement of showing the intial list of users on the page.

    I want something :- "Select users where extended filed_NAME value = yes/no ". I want to filter based on a radio button field.

    Don't mind if you do not want to answer.But awaiting any help possible.

    Thanks in advance.

    - Sumit Rathore

    http://wordpress.org/plugins/bp-profile-search/

  2. sumit784
    Member
    Posted 11 months ago #

    Adding to this above, On this specific page, I need to show user details from extended fields as well. so the user details on this page will look like :-

    User name
    City | state
    Date of birth
    other_custom_field-1
    other_custom_field-2
    other_custom_field-3
    .
    .
    .

    How will I show then before and after search result ?

  3. Andrea Tarantini
    Member
    Plugin Author

    Posted 11 months ago #

    Hi Sumit,

    I think you could add a print statement to BP Profile Search to display the SQL query it uses. Then, using the plugin, you can apply the filters you need and just copy the displayed SQL statement into your code.

    Your second question is not related to BP Profile Search, so I advise you to post it in the general BuddyPress forum.

Reply

You must log in to post.

About this Plugin

About this Topic