I updated the functions.php and nextar-slider.js files and put the updated files back in the "Salient" folder on my ftp.
...Do I need to also put these 2 files in my "Salient-child" folder so they're not overwritten when I update the Salient theme at a later date? If so, what sort of file structure do I need to preserve in the "Salient child" folder.
Thank you! I understand the process at a high level, however I'm uncertain about the code I need to insert. If you'll allow me to lay it out below...
1) If the following is the block of code in the
functions.php file that had been updated (by just removing the "loop autoplay" after "preload="auto"), do I add this entire block to the functions.php in the child theme as so?:
2) For the nectar-slide.js file, per your other article, I removed this code so, I'm confused what would need to be added to the child theme file to indicate that this has been removed (do I just add the entire new file into the js folder into the child theme folder?):
//play video user is hovering over
$('body').on('mouseover','.swiper-slide', function(){
if($(this).find('video').length > 0 && $(this).find('video').get(0).paused == true && $animating == false){
$(this).find('video').get(0).play();
}
});
1. You'd need to copy over the entire nectar_slider_display function into your child theme as that will be used instead of the default one in the parent theme
2. You will indeed need to add the entire file into the a child theme js folder but then also add that function into the functions.php that I referenced above (but mod it to use the init.js file instead of a stylesheet)
Hi Tahir,
I followed your advice in this article (http://themenectar.ticksy.com/ticket/154993/search... about removing the looping from the video in the nectar slider looping.
I updated the functions.php and nextar-slider.js files and put the updated files back in the "Salient" folder on my ftp.
...Do I need to also put these 2 files in my "Salient-child" folder so they're not overwritten when I update the Salient theme at a later date? If so, what sort of file structure do I need to preserve in the "Salient child" folder.
root level:
1) functions.php
2) js folder
>>within js folder:
nectar-slider.js file
?
thank you,
Matt
Hey Matt, here\'s quick writeup I did on moving css files into the child theme - the process will be very similar for js files
http://themenectar.ticksy.com/ticket/167594/search/
Cheers
Hi Nectar,
Thank you! I understand the process at a high level, however I'm uncertain about the code I need to insert. If you'll allow me to lay it out below...
1) If the following is the block of code in the functions.php file that had been updated (by just removing the "loop autoplay" after "preload="auto"), do I add this entire block to the functions.php in the child theme as so?:
2) For the nectar-slide.js file, per your other article, I removed this code so, I'm confused what would need to be added to the child theme file to indicate that this has been removed (do I just add the entire new file into the js folder into the child theme folder?):
Once again, I appreciate your help and guidance!
best,
Matt
Hey matt,
1. You'd need to copy over the entire nectar_slider_display function into your child theme as that will be used instead of the default one in the parent theme
2. You will indeed need to add the entire file into the a child theme js folder but then also add that function into the functions.php that I referenced above (but mod it to use the init.js file instead of a stylesheet)
Cheers
Hey again - this is the actual function you'd place into the child theme functions.php to get the init.js file to load from your child theme
Hi again,
Just wanted to followup from my private comment above.
thank you,
matt
Hey Matt,
Yes that looks accurate
Cheers
Hey Again!
See screenshot: http://prntscr.com/666wte . Might be a File Permission Issue see url: codex.wordpress.org/Changing_File_Permissions .
Thanks
ThemeNectar Support Team
Hi Tahir,
Hmmm...I am using a shared hosting plan with godaddy and never had this issue with using a Salient child theme with before.
I guess the bigger question is --- is there an update coming that would allow me to stop the looping on the video in the Nectar slider? : )
thanks again,
Matt
Hey Matt, it's not going to make it into the next release but i've noted your +1 for the idea :)