Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Nicolas Blanco Mattos
PLUS
Nicolas Blanco Mattos
Courses Plus Student 2,545 Points

Best way to "hide" parent's and child theme's names

Hi!

Would it be a problem for future theme updates if we change the parent theme folder name (for example "nicolastheme")? So we could have "nicolastheme" in the child style.css, in the "template" value... In order to be able to, in some way, hide our cutomizations from people inspecting our code, and also for security.

I dont' know if doing that could bring up some future problems with theme updates... If so, What would be the best way to hide that information?

1 Answer

Hi Nicolas,

If you are using the parent child theme structure you would simply need to name your child theme accordingly.

Parent Theme - exampletheme Child Theme - exampletheme-child

If you go in and edit the parent theme name directly you need to make sure you update you child theme.

I think you know the above but I wanted to clear it up.

I am not clear however on why you would need to so such a modification, you may also come into some weird licence issues depending on if you are using free or premium themes.

If I had to give advice on this I would certainly be saying stick to the default behaviour!

Hope this helps Craig

Nicolas Blanco Mattos
Nicolas Blanco Mattos
Courses Plus Student 2,545 Points

Ok, thank you. I didn't realize it could bring licence problems... The thing is that this is something another developer asked me to do, so I had to search for some info and do it. I guess, it's for hiding info to competitors (what themes you are using on your webs), but I really don't know why...

The thing is that if we follow the structure of a child theme, in the style.css file we have to write the parent theme directory. If the parent theme directory is "twentysixteen....." they would know what theme it is. So the idea was to change parent theme to "something-else-theme", so that is what you are going to see in the style.css file of the child theme...

I really don't know why but in many webs I've analyzed, they had this custom directory names that don't let you know what template is, and it's clearly Enfold template for example...

Anyway, thanks for the advice ;)