Yes, you can substitute all-purpose flour with whole wheat flour or gluten-free flour. However, this will alter the texture and flavor of the cornbread.