I’m trying to check whether the featured_topic field is checked and only show those terms. This seems to work, but I’m wondering if this is the right approach for multiple conditions or if there is a way to combine the if statements.
…without “loop”, which tells the If tag to check if a loop can be created (and is not empty). But from the documentation, it looks like the checkbox field must be a loop. So the way you wrote it is correct, and should work.
For combining multiple conditions - the simplest way is to nest them like you did.
Unfortunately there’s no convenient method like AND, because of how HTML attributes work (there cannot be multiple attributes of the same name).
In the newest plugin version, the If tag has been integrated deeper with ACF field types, including those that are loops, such as acf_checkbox, acf_relationship, etc.
So the following should work as expected now, without having to use “If loop”.