
Law prohibits political campaign or election related activities at the cemetery, not photography in general. If their photographs are not used by their campaign officials and trump can reasonably articulate a reason to have been there aside from campaigning, which would be pretty easy, it does not seem there would be any grounds against him. It seems the news reporting on the incident is the primary coverage of the visit.
Interestingly enough, when Eelohim is used to refer to the Hebrew God in the bible, it takes singular verbs, while it take plural when referring to the gods of the nations surrounding them.