0

I'm currently working on a site with coworkers and our way, since we have only one staging, is to have 4 times the theme. The master branch in git, and we got each our version of the theme with the bit we are working on.

Thing is, in our theme switcher (we are using PWD Theme Switcher) we got 4 themes with exactly the same name. And changing the name in styles.css would screw up the git.

So is there a way to change or append something to the theme name in the functions.php? Something like adding the folder name to the theme name would be great, because even if its in git, it will change dynamically depending on which theme its referring to.

1 Answer 1

0

If it's a matter of just needing to add an identifier to the theme you can add the folder name into the description of the style.css so you can see it when selecting themes from the wordpress dashboard. Either that or create different version numbers.

1
  • Yeah that would be easy. Modify the style.css file for every branch. But really, what I would like is a solution that does so automatically. Like with PHP i could probably go fetch the branch name and uses that in the theme name to help.
    – Fredy31
    Apr 5, 2022 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.