Knowledge Base

  1. Home
  2. Docs
  3. Knowledge Base
  5. Publishing Sliders

Publishing Sliders

Method 1: Using Shortcodes

Shortcodes are special text snippets, which you can paste into almost all places where you can enter text like the WordPress page and post editor. They will then automatically be replaced with the appropriate content on your front-end pages. Shortcodes are one of the most commonly used methods of inserting contents to your site.

Each slider has a unique shortcode. The shortcode of the slider is directly in the overview below each slider and can be copied immediately. You can also find the shortcode of a slider at the bottom of the Slider Builder page next to the save button.

Copy the shortcode including the bracket at the beginning and at the end and copy it into the editor e.g. [hero slider6039f91e8d9b1].

Method 2: Gutenberg

Recent WordPress releases are now shipped with their new page editor called Gutenberg. It’s aimed to be an alternative for popular page builder solutions and offers WYSIWYG visual editing.

  • Step 1 – Click to add block.
  • Step 2 – Then click on Browse all.
  • Step 3 – Under the widget category you will find a block Shortcode, select it.
  • Step 4 – Then insert the shortcode.

Method 3: WordPress Widget

Our Slider supports widgets, so you can add sliders to your front-end pages with just a drag n’ drop action. To do that, navigate to the Appearance menu on your left sidebar and select “Widgets“. Grab the HERO SMARTSLIDER widget and drop it into one of your widget areas.

Please note that some themes may not support a widget area that you’re looking for. In this case, you can create a new widget area by editing your theme files. Here is the official documentation about widgetizing your theme. However, this requires web development knowledge and we don’t recommend it for users without experience.

Method 4: Page Builders

Most page builders in themes support embedding sliders out of the box or you can insert shortcodes in the same manner described in the first method.

Method 5: PHP Function

Because a slider can be an integral part of your site, you may want to insert it dynamically from the template files. There is a PHP function to do just that. For example, you can call it from the header.php file of your theme and it will insert your slider into the corresponding area. In the slider you can also find the PHP code under Embed.

Was this article helpful to you? Yes No