I hope some traditionalist will post a more helpful answer.
Almost all Hindus refrain from visiting the
temples (at least th
South Indian. especially from Tamil Nadu do) for one year from the date on which the death has occurred or from the date of
performance of the Gruhayagna (Gregya)-கிரேக்கியம் ,the Thirteenth Day ceremony.
This is an erroneous interpretation of the
Sastras, without an understanding the thirteenth day ceremony,Gruha
Yagnya, also called as Subasweekaram.
The word ‘Gruhayagnam’ means the performance of Yagnas at Home.
Householders are not sanctioned to perform the Daily Karmas,Duties, for thirteen days from the
date of death in the family.This sanction excludes Sandhyavandan/Sandhyavandana.
On the thirteenth day. a
Purification ceremony is performed at Home( Punyahavachanam)and people are asked to visit temples.
If one is purified to perform Yagnas(Gruhayagnas), it is illogical to proscribe a visit to the Temples.
( one also finds, as I see a comedy in this, many people visit temples refraining during this period except those on Hill Tops;if one can visit a temple, why on earth should one not visit a Temple on the Hill tops?)
The other term, Subhasweekara means ,literally,’inviting the Auspicious’.
Once when you invite auspiciousness to visit you, you can visit temples as well.
People must remember that the Vedas do not mention visiting temples at all, though
Time that we understand the Karmas and act accordingly with out following some one blindly.
https://ramanan50.wordpress.com/2013/05/11/wrong-practices-hinduism-temples-death/