Home › Forums › Backend Issues (wp-admin) › How Do I Further Constrain a "Filter by Post Type" Result Set › Reply To: How Do I Further Constrain a "Filter by Post Type" Result Set
Is there some reason that you need to select from a list of products on the manufacturer field?
For example, there are 10 products related to the manufacturer but you only want to select 5 of them.
Or do you want to be able to have all of the products related to the manufacturer selected in the relationship field?
If it is the second, that is all of the products are selected that are related to the manufacturer, the I would use https://wordpress.org/plugins/post-2-post-for-acf/, this plugin handles one to many relationships.
If it is the first then you need to create an acf/fields/relationship/query filter. In this filter you need to do a query to get all of the products related to the current manufacturer. Then you use the return or this query to set the “post__in” argument for the query that ACF will do to get the list of posts to display in the relationship field.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.