Support

Account

Home Forums Feature Requests User Field Type search

Solved

User Field Type search

  • Hello

    I’m working on a real estate agent website which contains 100s of properties and over 16,000 Users (WordPress subscribers).

    The Users are either property sellers or potential buyers.
    We are using Advanced Custom Fields to store and organise the property details within a custom post type ‘property’.

    We are using the User Field to record the property seller, and also to record which users view and make offers on the property using the Repeater field. This means that on an ‘Add Property’ page there are initially 3 User select menus. As the property gets viewings and offers the number of User select menus increases.

    This was working great until we imported the 16,000 users. After the users were imported the add/edit property page is loading very slowly. It is apparent that building 3 select menus each with 16,000 options has caused the problem. The source for a blank ‘Add Property’ page is 2.3 mb (GET post.php?…).

    Is there an alternative ‘User Search then select’ field type that would allow the page to load before the users need to be queried? It would also narrow down the list of users to select from.

    Also it would be nice to have a link to the selected users profile, for example to quickly find the property sellers phone number.

    Is there such a User Search Field available or is there another way to solve this problem?

    Thank you for any help or advice.

  • Hi @artificialart

    Currently there is no user search field, however, you could easily create one in a few hours.

    Checkout the tutorials section of the documentation page to learn about creating a new field type.

    Thanks
    E

  • Hi Elliot

    Thanks for getting back to me.

    Ill send you a copy when its done. I suspect a few other people that complain ACF has slowed their site have the same problem.

    BTW thanks for a great plugin.

  • i’d really need this as well..

  • +1, if you plan to develop a solution can contribute on GitHub

  • http://www.artificialart.co.uk/acf-user-search-select.zip
    https://github.com/artificialart/acf-user-search-select

    Above setup as plugin. Tested on ACF v4 & WP 3.6 only

    Works with repeater field

    Will submit to http://wordpress.org/plugins/add/ when we get round to readme and screenshots

    To use just start typing into user search field- results should appear below, then click on result to select.

    Hope it works for you. Please let us know.

  • wow, thanks, I will try it out and send some feedback here or github

  • seems to work very nicely out of the box

    although in the meanwhile I’ve opted to use P2P plugin because it has often a better handling of post relationships than ACF

    http://wordpress.org/plugins/posts-to-posts/

    it allows for reciprocal connections and stores data in its own tables, something that ACF doesn’t have

  • Thanks for the feedback Fluvio

  • This is a different but related question. Is there a way to query the content of the custom fields that I have created when I perform a user search in the WordPress Dashboard (i.e. perform a search on the “/wp-admin/users.php” page)? For example, if I have created an “eye_color” custom field and type “brown” in my user search, is there a way to have ACF return all users with a “brown” eye color in my search results?

    (I can create a new thread if this question is significantly different than the original question.)

  • Hi @pursuit

    Yes, can you please create a new thread as this is not related to the origional topic.

    Thanks
    E

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘User Field Type search’ is closed to new replies.