Wheat flour is a really useful and versatile thing, but sometimes it's not your best available option. If you've got someone in the family with celiac disease or a non-celiac gluten sensitivity, for example, wheat and a lot of other flours are completely out of the picture. If you're low-carbing, you don't have to eliminate wheat entirely, but you won't have room in your day for a whole lot of it. In both of those cases, coconut flour is an interesting and useful alternative. It's not at all like using wheat flour, though, which makes it a difficult substitution.
If you're new to coconut flour, it's going to be a big adjustment for you. Wheat flour is mostly starch, with a bit of protein and fiber. Coconut flour is mostly protein and fiber, with a bit of starch. That means they behave really, really differently in recipes. The biggest thing you'll notice is that coconut flour soaks up an absolutely ridiculous amount of liquid. It also doesn't have any gluten, which is the whole point in some cases, but it means you'll need to find some other way to add structure and elasticity to what you're making.
Both of those things change your dough or batter radically, which makes off-the-cuff substitutions a real challenge. Rather than trying to adapt a favorite recipe, you're usually better off to start by making established recipes designed and tested for coconut flour. Once you've gotten a feel for how it works, you can try to convert one of your existing recipes or adapt a coconut-flour recipe to be more like your own.
Add Eggs for Better Results
Usually a recipe that's built around coconut flour uses a lot less flour than a recipe built around wheat flour. You'll generally only need 1/4 to 1/3 as much coconut flour, but you'll need extra liquid compared to a wheat-based recipe. If you look at a few coconut flour recipes on the internet, the first thing you'll notice is that they're usually heavy on eggs. That's because eggs neatly solve two of the problems with coconut flour: They contain lots of liquid for the flour to soak up, and the protein in the eggs will give your doughs or batters the structure that gluten would normally provide. You'll need at least two eggs for every 1/4 cup of coconut flour, and sometimes more. Depending on the recipe, you might also use other gelling ingredients like xanthan gum, guar gum or even flax seed soaked in water. They'll all help.
Add Gluten, if You Can
Using eggs and gums to get a decent result is pretty much mandatory if you're celiac or have a wheat allergy, but if you're just looking to cut carbs, you can add gluten itself to your coconut flour. It's usually sold as vital wheat gluten, a highly refined flour with most of the starches removed and the gluten left behind. A 30-gram portion of one major brand, for example, contains 23 grams of protein but only 3 grams of net carbs. Whisking a tablespoon or two into each quarter-cup of coconut flour, before combining the wet ingredients with the dry, will give you a dough or batter that behaves a lot more like its wheat-based equivalent.
Remember a Couple of Tips
There are a few other things to bear in mind when you're working with coconut flour. One is that it tends to clump, so you need to mix it really well into your liquids. Another is that its absorbency tends to result in baked goods that are dense and a little dry, even when you're using the right quantity of liquids. In batters, you can battle the density issue by separating at least some of your eggs and beating the whites to soft peaks, then folding them in. They'll lighten your batter and add some leavening power, for a fluffier end result. In denser baked goods, you can add wet ingredients like shredded or pureed fruits and vegetables. They'll help keep things moist, even after the coconut flour soaks up its fill of the liquids.