Filter CPT with ACF Relationship Field

Hi, I’m looking for help or guidance with setting up a filter.

I have two custom post types: Data and Companies. The Data posts have an ACF relationship field that links them to one or more Companies. The ACF field is set to return the company post object.

I want to create a dropdown filter on the Data posts archive page, where users can filter the Data posts by Companies. Only the Data posts associated with the selected company should be displayed.

Does this sound like this would be possible?

Thanks in advance,
Andrew

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer