The main problem here is that viral genomes lack universal gene markers. You have to identify first the type of bacteriophage you are working on for only then select a target gene. In some groups DNA polymerase gene have been used, for example (which can be absent in retroviruses).
I recommend you this article, which tries to address this problem:
Thanks for Salvador and Andrew for your precious information. I also thought that capsid and tail protein genes may have specificity as they provide specific recognizing and protection feature for the phage assist it to infect its host, additionally the polymerase coding gens could be helpful to recognize phage according to their phage-specific features. The problem here, is when you try to design a primers to be universal for viral family you can not find (by multiple alignment) acceptable conserved area even for primers so, you have to design specific primers for each one which will be time consuming.
Labeed, that is exactly the problem.. viruses evolve so fast that sequence conservation is normally a lacking property in their genomes. The capsid proteins are structural... and as this structure is not necessarily unique for all viruses, their proteins tends to vary due to fast evolution. However, information processing proteins (like DNA or RNA polymerase) are quite constrained in such aspect. This is why phylogenetic markers are normally genes related to information processing (e.g. 16s in prokaryotes, 18s in eukaryotes). In viruses one would normally think in their DNA or RNA polymerases.. depending on the type of virus you are focusing on.