From what I've seen there is common for a theme developer to make multiple slider plugins available in a theme.
I intend to add the capability of including a slider on the home page of my theme. I find it quite difficult to find a general way of including one slider so that the user can change it with another one if he wishes to.
Say that the user has 3 available sliders he can choose from: x, y and z In my Theme Settings Page I have a simple Radio option "Enable / Disable slider"; If the slider is enabled I have to find out what slider (x, y or z) the user wishes to display on the home page and display it accordingly.
Now, with only my custom slider implementation the things are pretty simple.
functions.php
global $customSlider;
$customSlider = new CustomSlider();
header.php
<?php if (user_wants_slider()) : ?>
<?php $customSlider->renderSlider()?> //renderSlider echoes the HTML code
<?endif ?>
I imagine this is a wrong approach considering that it would be difficult to implement the Nivo Slider in the header.php if the user would choose that instead.
Is there any good practice for this problem? Thanks!