happy icon indicating copy to clipboard operation
happy copied to clipboard

Create theme settings

Open krogsgard opened this issue 12 years ago • 4 comments

Need to create theme settings for a few features:

  1. enable archives or excerpts
  2. enable menu toggles (choose which menus receive toggle)
  3. enable home feature area
  4. some other, more typical stuff

krogsgard avatar Sep 12 '12 16:09 krogsgard

Do you plan on using an options framework or building from scratch?

bryceadams avatar Oct 05 '12 03:10 bryceadams

@bryceadams thanks for checking in, Bryce : ) I'm probably going to roll my own based in large part on Tom McFarlin's boilerplate https://github.com/tommcfarlin/WordPress-Settings-Sandbox Though it will be much simpler. I'd like for most of the theme settings to be configurable through the customizer.

krogsgard avatar Oct 05 '12 04:10 krogsgard

@krogsgard The code structure in Tom's sandbox example looks nice and clean. A bit of repetition, but it's an example boilerplate so... :)

One thing I did notice is that all options are stored in individual rows in the options table. While this is done, it's not ideal (all should be in a single row, rather, in a serialised array).

You could create a function/method to get, format and cache the settings as well, which would save both on database storage and be useful and scalable in terms of the PHP involved. :)

mattyza avatar Oct 05 '12 12:10 mattyza

Hi,

I just wanted to weigh in and say that the less theme options the better. I think since it is a base theme, too many would be overkill. You want people to focus on the responsiveness, not the options after all :-)

JamesGeiger avatar Dec 07 '12 15:12 JamesGeiger