Yes, this is possible 🙂
Assuming your custom theme name is “custom”.
1. Copy our classic theme file /wp-content/plugins/automatic-youtube-gallery/public/templates/theme-classic.php to your custom theme location, rename it as you like, and apply your changes.
2. Then, add the following code to the bottom of your theme’s functions.php file,
function automatic_youtube_gallery_custom_template( $template, $theme ) {
if ( false !== strpos( $template, '/theme-classic.php' ) ) {
// theme = custom
if ( 'custom' == $theme ) {
$template = 'theme-custom.php';
}
}
// return
return $template;
}
add_filter( 'ayg_load_template', 'automatic_youtube_gallery_custom_template', 99, 2 );
Note: You must replace the $template variable with your custom theme file path.
3. Finally, add the attribute theme=”custom” in your shortcode.
Example:
[automatic_youtube_gallery theme="custom" ...]
That’s it. Hope this helped you!
Thread Starter
sujanm
(@sujanm)
Awesome! Thanks for the reply. I’ll give it a try.
Thread Starter
sujanm
(@sujanm)
I tried it, and it worked well. Thank-you for the guidance.
I am happy that you got this working. Our next version is released in a few minutes and it introduces some changes to our template files. Also, our gallery script files are completely rewritten. Actually, these changes should not affect your custom theme. But, still, we would recommend testing your changes in a staging environment before updating the plugin in your live website.
Please feel free to contact us if you had any issues.
Thread Starter
sujanm
(@sujanm)
I upgraded to the newest version and I can confirm that the customizations I made were not lost and seem to work fine. Thank you.