If you are travelling to Ljubljana by train or by bus, you can take your bicycle with you on selected international train lines and on selected bus lines operated by FlixBus in the summer months.
Most other bus companies enable you to transport your bike in the trunk of the bus, but only when enough space is available in the trunk, as the passengers' luggage has priority.
Train lines, enabling you to travel with a bike throughout the whole year:
More information: Slovenske železnice
Once you arrive in Ljubljana, you won't have any problem getting around by bike, as Ljubljana is one of the most cycling-friendly cities in the world.