As long as there is a moist area for fungus gnats to lay eggs on they will breed prolifically. You need to remove any breeding areas or else you will fight them and fight them and fight them because even if you kill off all the adults there will be eggs waiting to hatch and then you're back to square one and have to start all over again.
Cover your soil with a layer of sand, as thick as you have room for. The sand will dry out fairly quickly after watering and it will deprive the gnats of good breeding/egg laying ground. There are various types of non-toxic/glue type bug strips, purchase a few packs and stick them around your grow area. The combination of loss of breeding ground and adults being trapped you will be rid of them fairly soon.
Another way to help, and sometimes speed up getting rid of fungus gnats, is after covering your soil with sand use something like a margarine tub, something with a top that seals, and place a moist paper towel in the bottom. Leave it for about three days and then put on the cover, seal it up and toss it and repeat with another similar container. By using the sand you removed their previous egg laying location but then you offer them a new one, the container with a moist paper towel in it. They go to it, lay their eggs, then you seal it and remove the eggs so they cannot hatch and become larvae and then more gnats. You break the breeding cycle and if you add the non-toxic glue traps you will be rid of them even faster.
More information about your other question would be useful, and pictures would be even better.