Where does php code to load data go?

Thing is, the code can go to many places. For me, personally, is to develop own plugin and add code there. If you need to something execute at certain point, use add_action hook. From what you wrote, this question might be helpful: add_action hook for completely new post?

How can I create a button that when clicked populates a div with a list of foods that are checked as a certain type of ACF?

First I’d recommend you to make sure $meal_type = get_field(‘meal_type’); returns array of strings – to do this you can simply call var_dumb($meal_type) after getting this field value. So for example if you’ve used a Repeater field for meal_type, you’ll see array of arrays and not array of strings. Also It’s kind of strange thing … Read more

Display Custom Field or Custom Taxonomy in front page /post/product

It depends on the theme you’re using if it has the functionality to show the information. Usually, if you had a custom attribute using default WP, it will show those but for advance custom fields you might need to add the code into your theme. For example, the following code will help you to display … Read more