Child Theme functions.php setup for Stargazer 4.0

2 Replies ·

  1. I have an Stargazer Child Theme that was made using the old Child Theme documentation ( Stargazer 4.0 has significantly altered the functions.php to something more object-oriented. Should I modify my child theme functions to match this new approach, and if so what’s the best way to take advantage of it?

  2. Justin Tadlock

    You don’t need to go toward using a class-based system for theme setup. That’s something I tried with a couple of themes to see how I liked it.

    On the theme project I’m working on right now, I’ve gone to something even far different that’s a mix of OOP with some “old-fashioned” procedural code for setup.

    In the end, what matters is what you think fits best for you. WP is pretty flexible with that.

    I feel like keeping it simple within child themes is the best route, and that’s the route I recommend in that tutorial. But, I’d be happy to walk you through any code if you want to try some different approaches. There’s more than one way to skin a cat, as the old saying goes.

  3. XFaCE

    Thank Justin! My theme in question is simple enough that it would probably be overkill to rewrite it, based on what you have explained. However, I have more complicated future child theme where it may make more sense. Will keep your offer in mind.

    Thanks again!