• Hi Snippets

    I have some code that enqeues external php and css files to load. I had it in a child theme, but since I then loose the theme design, I prefer to move back to TT5, add the enqeues in code snipppets and then enqeue external files. I am using:

    require_once get_stylesheet_directory() . ‘/file-path/external-functions.php’;

    This does not seem to load and I remember that this hook is specifically for a child theme?! Do you know which one to use?

    But first of all, do you see any issues with such a construction?

    Code Snippet – functions enqeue
    External files – custom folder inside TT5 structure

    Any advice on this is most appreciated.

    Thx

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Imagehebhansen

    (@hebhansen)

    I have switched to: require_once get_template_directory() .

    I am not sure which one is correct when I fire this from code snippets, meaning themes functions.php

    Can you advice?

    Plugin Author ImageShea Bunge

    (@bungeshea)

    Hi @hebhansen,

    This really depends on where you store your external files – can you let me know where within wp-content that is?

    Thread Starter Imagehebhansen

    (@hebhansen)

    @bungeshea

    I have created one custom folder, that holds custom files in a logic folder structure for css and php respectively.

    as long as paths are referenced correctly, it should work or not? I prefer to not reveal file locations. Thx

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Enqeue files from Code Snippet’ is closed to new replies.