Why are solids and liquids ignored in the equilibrium constant?
A solid or liquid that should take part in a solution or gas phase reaction has to dissolve or evaporate before it can react in any meaningful way.

If you add more solid solute to a saturated solution, its concentration does not change, and so doesn't the equillibrium constant of a reaction of the dissolved solute.

(The solute might also react directly out of the solid. Theoretically. But this different reaction needs much more energy than the one from solution, and it will only add a minuscule shift to the total equillibrium, even if your solid has a huge surface. Surely neglectable, most likely not even measurable.)