How Do I Make My WordPress Slider Revolution Responsive?
Making your WordPress slider responsive is easy, but it does require a few steps. First, you’ll want to create a new file called slider.
php in your WordPress folder. In this file, you’ll need to include the following code:.
add_settings_section(‘general’, array( ‘title’ => __(‘Title’), ‘content’ => __(‘Content’), )); $ slider->add_settings_section(‘images’, array( ‘title’ => __(‘Image Title’), ‘content’ => __(‘Image Description’), )); $ slider->add_settings_section(‘speed’, array( ‘title’ => __(‘Speed’), ‘content’ => __(‘Slider Speed (default: 800)’), )); $ slider->add_settings_section(‘responsive’, array( ‘title’ => __(‘Responsive’), ‘content’ => __(‘Responsive’), )); return $ slider; } ?>
Next, you’ll need to create a new file called style.css in your WordPress folder. In this file, you’ll need to add the following code:
slider { width: 100%; height: 100%; } .slider__item { float: left; margin: 0 10px; width: 31.5%; } .
slider__item__title { font-size: 30px; font-weight: normal; } .slider__item__content { font-size: 18px; }.
Finally, you’ll need to modify your WordPress theme to include the following code:
That’s all there is to it! Your WordPress slider will now be responsive. If you ever need to make your slider responsive again, just remove the responsive setting from the slider.
php file and replace it with the appropriate value for your current screen size.