Does anyone know how to get from Ljubjana to Trenta on public transportation? And then from Petrovo brdo back to Ljubjana? Planning on doing some hut to hut hiking,but not having any luck finding out about transportation there and back. Thanks
Rome2Rio can be a useful first step in situations like this. It's pretty reliable at identify where trains and buses run. I find it less accurate on the fares and travel times, but at least you won't waste time looking for train information if there's no train service.
For details on train schedules I like to use the Deutsche Bahn website, though it won't provide fares for Slovenian trains.
For details on buses, keep drilling down on Rome2Rio until you (one hopes) eventually come to a link to the appropriate bus company's website. Or try Googling "bus City A to City B".
In the case of Ljubljana-Trento [edited: I meant Trenta], there appears to be no public transportation beyond Jesenice, though I think that might possibly change in high season.
I can't find a "Petrovo" in Slovenia. Please check the spelling/completeness of that town name.
Bus services to Trenta in the Soca Valley (not Trento, Italy) only operate on weekdays between June 24 and September 3 and on weekends between June 1 and September 30. There are also some limited direct buses from Ljubljana, otherwise a change in Kranjska Gora is required.
Petrovo Brdo has no bus service. You would either have to walk one hour (4 km) or hitchhike to nearby Podbrdo to the west (not sure there are taxis there), from where you can take a train to Ljubljana via Jesenice.
Train timetables from Podbrdo can be found on www.slo-zeleznice.si , bus timetables to Trenta are trickier. I usually use www.jpp.si which is comprehensive but it doesn't always work. In case you can't get it to work, www.ap-ljubljana.si will only show you the daily direct bus from Ljubljana to Trenta. For the options with a change in Kranjska Gora, I suggest you use www.alpetour.si You could also look at the very useful Timetables in the Alps PDF document, released by Cipra Slovenia. The 2017 edition will be released in May.
Edit: Since you are hiking, consider slightly modifying the last leg of your hike and taking a trail to Podbrdo instead of Petrovo Brdo to avoid the inconvenience of having to walk along the road or hitchhike.