
One very important aspect of a premium WordPress theme is the flexibility it offers to the users. That flexibility comes from the theme’s options panel. Some themes have ten options and some even have hundreds. But why doesn’t anyone allow the potential buyers to try the options out, make changes and see the full demonstration of a theme they are about to buy, not even WooThemes does that.
Why?
Well it’s quite simple, every time someone makes a change it will overwrite someone else’s changes and there is a big possibility that more people will be testing the options out at the same time and keep overwriting each other’s changes and wouldn’t be able to see how it works and behaves properly thus confusing everybody.
You probably have a blog, do you? Well imagine few more people making changes to it at the same time as you do, it’s like that. Stuff changes and you have no idea why, you didn’t change it.
So, How?
Well the idea is pretty simple, if you’re a theme/plugin developer you know that we have to add a prefix to our field names that go inside the database in order to avoid conflicts with other themes/plugins that could use the same names. For example, an option where the user inputs text he wants to be shown in the footer of a theme, we can call it “footer_text” but then it might conflict, so we add a prefix like “wpcp_”, “aviatic_” or anything else that we think should be unique or at least unlikely to be used by something else, so we get wpcp_footer_text.
Using that same method we can add the username of the user that makes changes as a suffix or prefix (doesn’t matter) so if a user with username “John” makes changes they will be saved and later retrieved as “wpcp_footer_text_John” and when a different user with username “Michael” makes changes it will be “wpcp_footer_text_Michael” so no conflicts will be made and no data will be overwritten.
Database Usage
For themes that have a big amount of options (like WooThemes or PliablePress) it will use a lot of data. For example 50 options changed by 100 users is 5000 rows in the database. But that’s not a big problem because WordPress can be set to delete the data after a certain time period.
Does It Really Work?
Well in theory it should work just fine, it’s pretty simple, i haven’t tested it yet but i started working on a little example and will update this post when it’s done. In the meantime if anybody is reading this let me know your thoughts.
Update: It Works
I just tested it and it works without a problem. I needed 2 minutes to alter a theme to support this, yes just 2 minutes, few lines of code. Check back later, i’ll throw in a demo so you can all test it out.
Our WordPress themes
We have a few WordPress themes that we would like you to take a look at if you want.
check out the portfolio











Hi! I have been developing a theme and have thought of the same thing. ‘Won’t it be nice if users can use it?’ But then dropped the idea because of this problem. Happy to know you had the same thought and trying to find a solution too. Please post it here once you have tested it.
Hey Slobodan,
I’ll be very interested to see how this goes. I’d had some thoughts about this as well (The ones I shared in the comments on PliablePress with you). I haven’t put any of it into practice yet though, so it will be great to hear how you get on! Definitely a great idea!
The database issue mightn’t actually be much of a problem to be honest. I don’t know about other themes, but with PliablePress, *all* of your settings are actually stored in one single database row, so scalability won’t be any issue at all there.
@Mr. JCRP – Will sure do.
@Michael – I’m really busy these days on client projects so don’t have time to develop something from scratch but i’ll check for a good free theme that has options and do that little change and we’ll see how it goes. Do you know about any good free theme that has options?
@Boba
Any update on this?
Could you do this by the IP of the computer someone’s browsing from so they don’t require a user account?
I realise my previous comment made no sense.
I mean, could a potential buyer access the theme options without logging in, and see changes live in their browser?
So the db would be prefixed with their computer IP, not requiring a username/password or any logging in.
Yes, that can be done, but the prob is that sometimes multiple people are using the same IP address (work, school…) so that could be a problem.
But it can be made without making a special account by having them log in to a premade account (one acc for everybody) and then giving him a cookie based on a random string that will be used instead of the username.
Oh I see. That sounds pretty rad! Outside of my area of expertise, however.
Thanks for the quick reply!