-
-
Hello,
I have modified my js/main.js file so that I can increase the testimonial duration as per your KB article, however I need this to be reflected in the child theme folder so that as new theme updates are available, my adjustments are not overwritten. I copied the file to specular-child/js/main.js, however when viewing the site, it’s not reflecting the child themes’ main.js.
If I am unable to do that, how can I declare this in the child themes functions.php?
I have found other instances where I have wanted to make adjustments with parent theme files and move to the child theme and it wasn’t possible and I was wondering if it could be possible for you to make an update in the future to the parent theme so that any files found in the child theme overwrite the parent theme.
Thanks for your time.
-
Hello,
Sorry for the late response.
We have added option to change the testimonial and slider speed from the theme. TO change the testimonial speed, edit the testimonial carousel element.Please download the latest theme version.
If you want to register a javascript file in child theme, you can add this code at ‘specular-child/functions.php’
add_action('wp_enqueue_scripts', 'load_javascript_files'); function load_javascript_files() { wp_register_script('ajax_call_mkto', get_template_directory_uri() . 'js/main1.js', array('jquery'), true ); wp_enqueue_script('ajax_call_mkto'); }
Then create the file at child theme ‘specular-child/js/main1.js’.
Best regards!
-
Hi Ruco,
That’s great that you have added the option in to adjust the speed. Do you have any plans on adding that option to “Testimonial (Cycle)”? That is what I am currently using and would love to have that option.
Meanwhile, I have updated my child themes functions.php file with the code that you provided to register a javascript file. However, it is currently referencing the parent theme folder instead of the child theme folder. While I could add the file in the parent folder, I would prefer to keep it in the child folder. Is there something else that I need to do so that the child theme folder is referenced?
Thanks!
-
You must be logged in to reply to this topic.