Prince Koretaka, as first son, was expected to inherit the throne but, the powerful Minister of the Right, Fujiwara no Yoshifusa, married his daughter to the Emperor, upon which his forth son, Prince Korehito (later Emperor Seiwa)was born. Because of pressure from Yoshifuse, Prince Koretaka was forced to give-up his claim to the throne and leave the capitol.
Prince Koretaka is enshrined here.
There are two bus-services per day, leaving from Kitaoji Station in Kyoto City. It's a 30-minute ride, costing you the sum total of ￥500. As there is 6-hours between the two services, you have ample time to explore the area. Bring adequate food & drink (there is a traditional Japanese restaurant next to the shrine), as-well-as appropriate clothing.