Slider

The Slider Shortcode allows users to place a slider on any pages as a shortcode on the UBC Theme. You can place the [slider] shortcode on any page or post, and you will have a feature slider.

1. Creating the slides

  1. The Slides for the slider are created using Posts(Figure 2)
  2. It is recommended to create a category to group all the slides so that they are easily sortable.
  3. The post title will serve as the Slide heading.
  4. The post excerpt will serve as the slide description, if an excerpt is not entered then the description will be taken from the main post content.
  5. The post featured image will be the slide image.
Figure 2: Creating slides using Posts

Figure 2: Creating slides using Posts

2. Creating the Slider

The [slider] shortcode is used to make the slider on your UBC Theme enabled WordPress site. Please ensure that the Slider Shortcode plugin is enabled for the shortcode to function properly. You can insert the slider on any page or post by using the shortcode. Here is a usage example with all the parameters set to their default values.

Here is a usage example with all the parameters set to their default values.

[slider height=’330′ category=’0′ slider_margin=’false’ lookandfeel=’standard’ maxslides=’10’ read_more_check=’false’ read_more_text=’Read more’ remove_link_to=’false’]

Parameters:

  • height – (default value: ‘330’) – This parameter will change the height of your slider image to the entered value
  • category – (default value: ‘0’ [it will display all posts]) – You can choose what post category to be displayed, by simply entering category slug or ID
  • slider_margin – (default value: ‘false’) – By setting this parameter to ‘true’ the 15px margin around the slider will be removed
  • lookandfeel – (default value: ‘standard’) – You can select from the following look and feel of sliders: {standard, blank, multi, transparent, basic-sliding}
  • maxslides – (default value: ’10’) – This is the number of slides to be shown within the posts in the specified category, or all categories if a category is not selected
  • read_more_check – (default value: ‘false’) – If you set this to ‘true’ it will add a read-more text at the end of the text on the slider
  • read_more_text – (default value: ‘Read more’) – If read_more_check is set to ‘true’ this value will be displayed at the end of the text on the slider
  • remove_link_to – (default value: ‘false’) – By setting this parameter to ‘true’ the anchor link to the slider image will be removed

 

Note: The width of the slider is dependent on the number of columns in the selected layout of the page.

Source: Slider Shortcodes – https://github.com/ubc/slider-shortcode