• Hello,

    I ask you please to help me solve this problem.
    I am creating a site (currently locally) with the oceanwp theme (I am currently working on the child theme), but without having Elementor installed.
    I created a custom template file in order to insert a carousel gallery that opens with a lightbox.
    I saw that in the theme there are already the scripts that allow you to do this (lightbox and slick) and they are obviously all enabled in the theme panel. Can anyone please tell me the code that allows me to invoke the scripts already installed in the parent theme within the file where I am building the gallery (in the of the child theme)?
    I don’t think it’s appropriate to download a plugin or load external libraries if the code I need is already present in the theme.

    I have already searched both in the documentation and on the web, but I could not find a solution.

    Thanks in advance for the help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    Please go to Appearance > Customize > General Options > Performance, from here you can disable enable the lightbox and other scripts.

    If you are still experiencing the issue, please share a bit more details and related snapshots.
    In addition, Would you be so kind and go to Elementor > System Info and share the report with us so that we can take a look?

    Thread Starter enia89

    (@enia89)

    Hi @abhikr781 ,
    thank you for answering me. My question was completely different.

    As I have already specified I am not using Elementor on the site and everything is already enabled.
    The problem isn’t that the code doesn’t work. My question is:
    What is the code I need to write to my custom .php file in order to invoke the scripts to activate “lightbox” and “slick”?

    Basically I created a .php file to create the “media” page template and inside I created my image gallery in html. Now I need to call the “lightbox” and “slick” scripts inside my html code so that my images can be viewed with a carousel and opened with a lightbox. But I just don’t know how to call these scripts, already present within the theme, in my .php file.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use theme scripts in custom template files.’ is closed to new replies.