• Hi TT5

    I am moving my child theme inside TT5 in it’s own folder, so that it can easily be transfered when upgrading to TT6 etc. as follows:

    Folders
    - TT5
    -- Child Theme
    --- functions
    ---- functions-woo.php and all other sub functions
    --- assets
    ---- css
    ----- child-woo.css and all other sub css

    functions.php in child theme enqeues sub functions with dependencies. This code I place in Code Snippets plugin. Why ddo I do this? so that I can do codes remote in VSC. This is not possible in Code Snippets. So once the enqeue is in order it should work I trust …? while maintaining the design of TT5.

    Now for theme.json. I have some child json, and I would like to keep this within the child theme folder, but I wonder how I can trigger/enqeue this child-theme.json file from this location as I do not want it overwritten in anyway. Also not overwrite theme.json from TT5 and finally, I want everything inside one single child folder, for easy consistent transfer in the future.

    I hope this is somewhat clear, so how do I enqeue child theme.json?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    This is very interesting. I’d like to learn if it actually works.

    As far as I know, WordPress does not support placing another theme inside a theme folder.
    It wouldn’t recognize it as a theme.
    So, I am not able to answer any questions about this, but I will follow the thread,

    Thread Starter hebhansen

    (@hebhansen)

    I am not adding a theme in a theme. The files I use just come from a child theme, that’s all.

    I have added the enqeue file in code snippets I almost never edit this, since it calls the more dynamic files external. I have pointed the site back to TT5 theme and TT5 kicks in just fine.

    The enqeue functions are not kicking in using

    // Include theme setup functions
    require_once get_stylesheet_directory() .

    As I remember it, this is specifically for child theme, so I need to research further for the correct hook as I am now simply operating inside TT5. I have corrected file paths, and they should all be correct.

    Site runs with no issues with this code activated in Code Snippets….

    I will follow up on a status asap

    I don’t know of a way to make WordPress detect theme.json in a different folder. It looks for json files in the root and the styles folder.

    You can programmatically generate the parent theme theme.json file. You could in theory let the theme create the new file in the file system, and use several parts to create one larger file.
    But really, if you are doing all of this you would be better of creating a completely custom theme.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.