Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Search & Filter Pro with an ACF Custom Post Type
- This topic has 15 replies, 2 voices, and was last updated 3 years, 9 months ago by Trevor.
-
Jee Way(Private) July 2, 2020 at 3:19 pm #251178
Hi,
I just bought this plugin in order to filter and sort “clients” on a page where clients are listed, (with localisation, type of client…) “clients” are an ACF custom post type.
I absolutely don’t get how to make search and filter pro work with my ACF Fields and I didn’t find any page on the plugin website…
I need some help and I don’t even know from where to start !Thanks in advance…
Trevor Moderator(Private) July 2, 2020 at 5:21 pm #251221ACF Custom fields are found in the Form UI. Add a ‘Post Meta’ object to the form, and then select the meta key name from the list. Make sure the name does NOT start with an underscore, it will appear a second time on the list without the underscore. Also select the ‘Is an ACF field’ option.
Jee Way(Private) July 4, 2020 at 8:31 pm #251396Last question, display the results with my ACF custom fields (logo, type of client, and name) won’t work with shortcodes ?
I displayed the result with shortcodes, filters are working, but the result only show the name of the client.
Is there a specific display result method for ACF ?Trevor Moderator(Private) July 6, 2020 at 11:29 am #251450You want to display the content of these fields in the results? If you are using the Shortcode display results method then you need to follow the customising guide here:
https://searchandfilter.com/documentation/search-results/using-a-shortcode/#customising-the-results
There are elements that you do not need, so you can delete those. For ACF fields, you can output the contents of the fields to the page using PHP code like this (the example is for a field named
test_price
):$test_price = get_field('test_price'); if( $test_price ) echo $test_price;
Your actual PHP may need to add HTML around what is echoed to the page.
Trevor Moderator(Private) July 6, 2020 at 3:19 pm #251538Are you able to send me a live link/URL to your search page so I can take a look?
Can you show me one or more annotated screenshot(s) of the design change(s) you want? If you can do that, you would need to upload the screenshot image(s) to a file sharing site (like the WordPress Cloudup site) and share the link with me?
Jee Way(Private) July 7, 2020 at 3:44 pm #251819Hi, I’m currently working on a local server so I won’t be able to send you a link right now but the website will be online tomorrow or on thursday so I’ll be back to you soon with the url. For now, here’s the design I need for the filters : https://zupimages.net/viewer.php?id=20/28/6hfv.png
Thank you for the results page, it worked great !
-
AuthorPosts
You must be logged in to reply to this topic.