Sliders plugin will help you to display the event slider on the front end of your website with event image, event title, organizer name, and organizer description. Also, event slider is totally responsive in different devices.
- Automatic Installation: You can install a plugin from the backend of your WordPress. Click Here to see how you can do automatic installation.
- Manual Installation: You can install plugin manually using SFTP or FTP tool as well. Click Here to see how you can do manual installation.
Complete Video Guide On Event Slider Add On
How To Get Event Slider Using 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.
Here, you can see how to get a slider using a shortcode.
- Log in to the Admin panel.
- Go to WP-admin >> Pages >> Add New.
- Name it something along the lines of “Event Slider”.
Add the below short code into 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: Set to true to show only featured events, false to show no featured events, or leave out entirely to show both.
- cancelled: Set to true to show only cancelled events, false to show no cancelled events, or leave out entirely to show both.
- event_online: Set to true to show only online events, false to show offline events, or leave out entirely to show both.
- limit: This controls how many events get listed on the slider.
- 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 direction, of events on the slider
- navigation: Set to true to show navigation arrows, false to hide these arrows.
- dots: Set to true to show dots below the slider, false to hide these dots.
- infinite: Set to true to show infinite events on the slider. The slider will keep showing all the events listed.
- adaptiveheight: If set to true, The sliders height will auto adjust according to the banner image, if set to false, the height will keep stagnant irrespective of 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 needs.
How To Get Slider 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 */ ?--> <!--?php 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 name, and organizer description.
Responsive View Of Slider
Yes, the slider you see here is,b>totally responsive. When your visitors are viewing the website on any of the different devices(tablet, mobile, iPad, etc.), the slider promises to render well without messing up the looks and format of your 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,
- 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 display event listings with 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.