Forums › Forums › Search & Filter Pro › Search by ACF Field in Custom Post Type
Tagged: advanced custom fields, custom post types
- This topic has 7 replies, 3 voices, and was last updated 4 years, 3 months ago by Anonymous.
-
Anonymous(Private) September 1, 2020 at 12:17 am #257884
Hi, I’m new to Search & Filter Pro. I have created two post types “Products” and “solutions” A product will have a taxonomy that relates it to a solution. On the solutions page I want to show related products.
My idea was to use this plugin and then have an ACF field “related_category” that the user would pick to show related products to that solution when creating the post. I’m running into two problems:
1. I don’t want to create a filter for each solution. I want it to be the same for all solutions and the only change (dynamically) would be the category via the chosen ACF.
2. I want to set the filter to be equal to the value of the ACF category chosen.
Is this possible?
Ross Moderator(Private) September 8, 2020 at 5:27 pm #258808This reply has been marked as private.Anonymous(Private) September 8, 2020 at 5:27 pm #258810Hey Trevor, I couldn’t get it work the way I wanted either. I coded a WPQuery to do the job and a custom function to output the HTML and the data.
For future releases, this would be a great feature for developers to be able to assign a related post type via ACF and add the search to a custom post type template via page builder and then that could be populated dynamically based on the post type and ACF field of related posts.
-
AuthorPosts