Install a fireplace hearth gate, which is specifically designed to keep children from accessing the hearth of the fireplace. With interlocking sections, it can be adjusted to fit various hearth sizes.
Consider only building a fire in the evening hours. During the daytime, when the children are around the fireplace, place light furniture such as a kitchen chair or small end table in front of the fireplace to block small children from playing near it. Build a fire only after the children are in bed.
Train your children to stay away from the fireplace. With your hearth gate in place, firmly say, "No, hot!" Each time a child reaches out to touch the gate, repeat "No, hot!" and move him or her away from the gate. In a matter of days, the child will make the connection of danger to the fireplace.