Forums › Forums › Search & Filter Pro › [Help] Tips for using ACF post objects with S&F
Tagged: acf, post meta, post object
- This topic has 1 reply, 2 voices, and was last updated 7 years, 7 months ago by
Trevor.
-
Anonymous(Private) June 6, 2018 at 11:52 am #179840
Because it is not recommended to connect one taxonomy (As stated on this forum here somewhere) to multiple post types I had the idea to create an extra post type which holds in theory some terms and connect them via post objects. I have used this multiple times now on multiple sites and this works fine, but never with S&F.
Right now I am sketching out the site structure of a large site which has multiple post types and all these post types are connected to specific animals (as terms) through out the site, so what I want is have a post type with animal names and connect them via the ACF post object field, but each post type (eg news, downloads, events) has their own custom filter on which you need to filter (eg all news posts that have the post object Animal connected to Dogs), are there things I should keep in mind while building this?
As a last resort I cloud create all separate taxonomies for each post type, but this means I have to manage as much animal terms as there are post types which is not a DRY way of working.
Trevor(Private) June 6, 2018 at 1:20 pm #179865Search & Filter Pro supports some ACF relational field types, but not the complex ones. For example, it DOES support the Post Type Object field. It can fetch the Post ID of the term and display the Title in the field list in the form.
What it cannot do is further digging in to the Post, to fetch other data terms. This is because ACF has a simple method to return the ID or Title, but no other data.
I am not sure if that helps.
-
AuthorPosts