How to Embed Crelly Slider in your WordPress Template
9 September 2015
In the last article we described about the features of Crelly Slider. As we already know Crelly is the best responsive wordpress slider plugin with layer animation and transition. It also supports touch, swipe and drag features. Let’s see how to embed crelly slider in your wordpress template.
Also read:
- 3 Best Online Tools to Detect WordPress Theme and Plugins
- Best WordPress Plugins to Detect Adblock Extension and Avoid it
Steps to Embed Crelly Slider in WordPress Theme
- Navigate to Crelly Slider menu
- Create a new slider by clicking on “Add Slider” button
- Specify the slider name “homepage_slider” and create your slider with images and text
- You will get “Alias” and “Shortcode” as soon you save the slider on the “Slider Settings” page
- Now go to “Appearance >> Editor” and then click on Homepage Template (home.php) or open any file you want to incorporate the crelly slider
- Paste the following PHP code where you want to embed the crelly slider
[php]
<?php if(function_exists("crellySlider")) crellySlider("homepage_slider"); ?>
[/php]
That’s it, your page initiates the crelly slider. There is another method to add Crelly slider to your wordpress with do_shortcode function-
[php] <?php echo do_shortcode("[crellyslider alias=’homepage_slider’]"); ?>[/php]
Thank you , the slider is showing in 2017 theme of wordpress but in my own custom theme. do i need some addition function to do so… pls let me know asap.
You need to add the PHP shortcode as we mentioned in this article, also make sure you are using wp_footer() code in your theme’s footer.php file.
Thanks a lot, it worked for me.
Hello Shrinivas, thank you so much for sharing this. Do you know how I can embed crelly sliders in the shark business theme? If there is a way without code, it will be great because I am not an expert with that. Thanks!
Hello, you can embed the Crelly slider by shortcode.
Hello Shrinivas, thanks for your prompt reply. I do have the shortcode, but how can I replace the sliders from the shark theme in the home page with the sliders made in crelly sliders? I tried to copy the shortcode in the home page, but it was added in the content of the home page not in the header or replacing the current sliders.
it seems that the theme doesn’t have the option to add the third-party shortcode, you have to add the slider shortcode in front-page.php using do_shortcode() function.