I have a single house plant, a larger sized plant I purchased from IKEA. It is potted in a large kitchen size garbage pail because I needed a narrow shape for it to fit in a built-in planter in my living room. This first one was a first time this plant got fungus gnats, I read that it could be caused by the top few inches of soil not draining well where they can form. I tossed that plant out and chalked it up to it maybe having badly draining soil or it came this way from the store.
I bought a new one one that is more a spiky plant and this time, I potted it with an irrigation spike so that I only water through the spike directly to the roots so no water touch the surface of the soil. I also covered the soil with a layer of diatomaceous earth.
Now, about 8 months later, there are fungus gnats coming from this new plant. This is is in a heavy pot that is awkward to remove from the planter, and I also made a thin wood covering in order to hold in the beach stones you see in the photo. Because of this, it's a big hassle every time this happens and and I'm ready to just do away with it altogether.
I also attached a macro photo I was able to take of one of the gnats. Is there something I'm missing as to why this keeps happening? Thanks for the help.