What's the best way to create several versions of a WP theme?

I have created a theme using Pinegrow, and I use it on a number of my own sites. However, as the sites have different audiences and content, I’d like to be able to tweak each site without losing the ability to add functionality or improvements on the “master” copy and be able to easily update the separate versions. I’ve been struggling with this for a while (but not full time!) and I’ve asked questions before without getting a real answer.

My question is: what’s the best way to set up this structure in Pinegrow/WordPress?

Currently, I’m thinking either using the Customise function and a single theme, or have a main theme and several child themes. However, neither of these options seem to be well documented in Pinegrow, so I’m looking for advice from someone who has tried working with these within PineGrow. Maybe this is one of those areas where it’s possible but not real-life practical - I understand the software is young and can’t do everything everyone wants (YET!).

The initial customisations that I’m looking at are:

Use adsense or not (probably on multiple post types)
Main background and text colour

Thanks for any input!

@greyguru how about creating child themes for each one.

HI Rob,

Thanks! That was one idea, I’ve read up on child themes, but it’s general instruction, not Pinegrow-specific. I’m not sure how I’d set up the project folder(s) and so on so that the child being developed still inherits the CSS and functions.php within pinegrow - the local copy I can work out. Maybe I’m overthinking this before jumping in, but it would be nice to know whether it’s possible before spending a lot of time!

David

Maybe you should consider using the WordPress Customizer actions for everything related to customization and adding sidebars to your layout so you can use widgets or not ?

Then, you can use the same “versatile” theme on all your sites, but set some options or not according to your needs.

1 Like

Thanks Emmanue,

That’s what I decided to try first. I’ve added a checkbox (“Include ads”) which is showing in the customizer. So where I’m at now is trying to output the adsense code if the checkbox is checked, or nothing otherwise. I already have a sidebar, and the plan is to show an ad at the top of the sidebar and any widgets underneath, or, for “no ads” just the widgets.

My problem is that there isn’t an action for “theme mod controls output”.That is, if the theme mode value is true, output the content, if false, do nothing. In the absence of that, I’m going to try the messier route of adding some php to test the value and output the ad or not. But right now, I’m going to bed.

Thanks

Note: You can also use Conditionals with your widgets. It’s pretty useful.


Or, plugins like this one for something even powerful with your marketing stuff :slight_smile:

1 Like

I had never seen these types of plugins - these create some huge possibilities! I should have realized by now that almost anything one can conceive, someone somewhere has created! Thanks!

However, I’d still like to suggest that Pinegrow expand the number of built-in customizer actions. Looking forward to version 3!