The sliders plugin helps users display their events in slider forms at the front end of your website along with the event image, event title, organizer name, and description. The slider plugin comes with responsive designs that are suitable for all devices.
Installing The Plugin
The installation process is the same for all the addons, offered by WP Event Manager. They can be both installed automatically and manually.
- Automatic Installation: You can install the plugin from the backend of your WordPress. Click Here to see how you can install the plugin automatically.
- Manual Installation: You can also install the plugin manually using SFTP or FTP tools. Click Here to see how you can install the plugin manually.
Watch the entire video for better understanding.
How To Get The Event Sliders Using A Shortcode?
There are two different methods to display the Event Slider on the website.
- The First one is using a shortcode.
- The second one is using a page template.
Follow the below-mentioned steps to display the Event Slider on the website using a shortcode:
- Log in to the Admin panel.
- Go to WP-admin >> Pages >> Add New.
- Add a suitable title to it.
Add the below-mentioned short code to the text area of the description box.
For Events, use the shortcode[events_slider].
For Past Events use the shortcode[past_events_slider].
- Preview and publish it on the website.
[events_slider featured="true" limit="5" orderby="rand"]
The Slider Shortcode Attributes
- featured: When set to true it only shows the featured events and when set to false it shows no featured events. You can leave it entirely to show both.
- cancelled: When set to true it only shows the canceled events and when set to false it shows no canceled events. You can leave it entirely to show both.
- event_online: When set to true it only shows the online events and when set to false it shows the offline events. You can leave it entirely to show both online and offline events.
- limit: This manages the number of events to display on the sliders.
- orderby: Displays the order of the events on the slider in respect to the attributes mentioned. Supports title, ID, name, modified, parent, rand,event_start_date, featured.
- order: Defaults to ‘ASC’. Can be set to ‘ASC’ or ‘DESC’ to choose the sorting the direction of events on the slider.
- navigation: when set to true it shows the navigation arrows and when set to false it hides these arrows.
- dots: when set to true it shows dots below the slider and when set to false it hides these dots.
- infinite: when set to true it shows infinite events on the slider. The slider will keep showing all the events listed.
- adaptiveheight: If set to true, the slider’s height will auto adjust itself according to the banner image, if set to false, the height will be stagnant irrespective of the banner size.
- autoplay: Set it to true, to autoplay the events on the slider. Set it to false if you want to manually navigate the events.
- autoplay_speed: [event_slider autoplay=”true” autoplay_speed=”300″] This will decide at what speed the autoplay of events should work. You can set it according to your requirements.
How To Get Sliders Using Page Template?
- Create a new .php file into the root folder of your theme.
- Name it something along the lines of “wpem-slider-template.php”.
- Add below code into the file and save.
<?php /** Template Name: Slider Template * @since: 1.0.0 */ get_header(); ?> <?php echo do_shortcode('[events_slider]');?> <?php get_footer(); ?>
Now, go to WP-admin >> Pages >> Add New. Here, you will get “Slider Template” option for Template under “Page Attributes” section at right bottom side of the page. Select that template and publish the page. That’s it! 🙂
For more clarification, see this screenshot:
Frontend View Of The Slider
This is how your slider will look on the front end of your website with the event image, event title, organizer’s name, and organizer’s description.
Responsive View Of The Slider
The Slider plugin from WP Event Manager comes with responsive designs which makes it easy for your website visitors to view the website on any of their preferred devices including mobile phones, tabs, iPads and more without hampering the overall format of the website.
Advanced: Overriding/Customizing the Template Files
For overriding or customization, template files can be found in the wp-event-manager-sliders/templates/ directory.
To override a template file,you need to follow the below mentioned steps:
- Create directory “wp-event-manager-sliders” under your theme folder.
- Copy the template file to “/wp-content/yourtheme/wp-event-manager-sliders/” directory.
- Your theme will use all the template files from the “/wp-content/yourtheme/wp-event-manager-sliders/” directory instead of the plugin’s template file (/wp-content/plugins/wp-event-manager-sliders/).
- wp-event-slider.php – which displays the event listings with a slider.
Remember: If you have overridden template file and plugin frequently updating then you need to sync template file with new updates from the plugin’s template file for better functionality and new features.