what is the correct way of using relative paths in wordpress theme development?

I am writing a some code for wordpress theme development that I plan on reusing for future themes (maybe even uploading to github).
it consist of a few dozen files and some javascript and css files as well.

the only commitment I am willing to make for the future is that all my files will be placed in the same directory, where will this directory be placed inside the theme directory is unknown.

how should I go about enqueuing files (wp_enqueue_style, wp_enqueue_script functions) if I don’t know the files absolute path (get_template_directory_uri . ”)?

also I hope that instead of having a dozen lines of includerequire, I can write one include file that will include the rest of the files by their relative paths.

Read more here: what is the correct way of using relative paths in wordpress theme development?

Leave a Reply

Your email address will not be published. Required fields are marked *