They are not prohibited from going to temple, but it is good to avoid as a mark of respect.
Moreover, those who can participate during shraddham must help out in the kitchen or aid any related works. Those who are unable to do can observe it mentally.
Helping out during a shraddham accrues benefits that is equivalent of visiting temples.