Support

Account

Home Forums ACF PRO How to change default posts count in Relation field and more

Solved

How to change default posts count in Relation field and more

  • Hi,

    1. I need to change the default number of posts to show in Relation field. Is there a function for that ?
    2. Add all button would be really nice to have too. We don’t always have thousands posts to list in the Relation field. Usually tens, so such a feature would work just fine 🙂
    3. Is there any easy function to add new posts at the end of the list, in relation field selected group (right column)?
    4. Is it possible to sort posts in the pick list (left column) by date ?

  • 1 and 4) if possible you would use an acf/fields/relationship/query filter. However, I do not now if changing orrderby or posts_per_page will have any effect. Some of the arguments are not changeable. If changing these arguments does not work then contact the developers.

    2) Contact the developers for feature requests.

    3) Yes, there are filters and functions that would let you do this. You’ll need to give more details about what you are trying to accomplish.

  • Hi,

    1. ok will have a look.
    2. ok
    3. We have database of authors as a custom post “authors”.
    I want to be able (in wp-admin) to:
    a. add new authors and sort them (that is possible as a standard)
    b. automatically add “newly added authors in the authors list” to the end of the selection field (right panel)

  • They should appear to be selected.

    If you wan to add them to those that have already been selected then you would have to use an acf/prepare_field filter. In this filter you would have to get the “new” posts, however it is you determine them to be new and then alter the $field[‘value’] to include the new post IDs.

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

You must be logged in to reply to this topic.