Soma Pro Theme Help Premium theme

change slider effect?

RD Started by Rich Dixon · March 17, 2018 at 2:58 pm · 3 replies 1 voice Last reply 8 years, 4 months ago
ST
Spiracle Themes Original poster
#2

Hi Rich

You need to edit js file to achieve this. Follow the steps below

Step 1) Go to theme root folder ie somapro (wp-content/themes/somapro)

Step 2) Go to js folder

Step 3) find soma-main.js and open this in any text editor

Step 4) Go to line number 106 and add animateIn: ‘animation name’, after this and save

ie
/*– owl carousel –*/
var owl = $(‘.slider-carousel’);
owl.owlCarousel({
autoplay:true,
loop:true,
margin:0,
navSpeed:500,
nav:false,
items:1,
animateIn: ‘fadeInLeft’,

});

You can find animations from here
https://daneden.github.io/animate.css/

Best Regards

ST
Spiracle Themes Original poster
#4

Hi Rich,

Yes, you can make these changes in child theme also. The procedure for this is a bit different. I am listing some steps here

Step 1) First of all copy your soma-main.js file from parent js folder to the child theme js folder. We will now edit the child version of soma-main.js

Step 2) Do the changes as I mentioned in above post reply i.e. you have to add animateIn property to the slider function

Step 3) Open Child’s theme functions.php and add these two lines just after this line this comment

/*— Adding a js file demo. Paste your js file inside the child theme js folder and add it like the example below —*/

wp_dequeue_script( 'soma-script');
wp_enqueue_script( 'soma-child-script', trailingslashit(get_stylesheet_directory_uri()) . 'js/soma-main.js', array('jquery'), '', true );

View Screenshot

Best Regards

Post a reply

Join the conversation. Be kind — this is a public forum.

Replying to change slider effect?

By posting, your reply becomes public (unless marked private).