Unyson icon indicating copy to clipboard operation
Unyson copied to clipboard

Same options on Theme settings and single post

Open sollerpolt opened this issue 9 years ago • 5 comments

Hi. I have a lot of options in Theme Options panel and want to allow users to customize each page/post. For example, on each page user can choose and configure header:

  1. Options in Theme Options panel is default values if user don't use single post settings (multipicker set to default)
  2. In single post user can use same settings, but only for one page.

What is best practice to do this? I want to prevent massive code duplication.

sollerpolt avatar Dec 04 '17 11:12 sollerpolt

https://github.com/ThemeFuse/Unyson/issues/1451#issuecomment-211517035

danyj avatar Dec 04 '17 13:12 danyj

multipicker set to default

I strongly suggest to use addable popup with limit to 1 ANY other option will overload the admin and front will have the full array with all options

addable popup is always empty array unless added

danyj avatar Dec 04 '17 13:12 danyj

but note that you will have to create a utility function to get global options , something like https://github.com/ThemeFuse/Unyson/issues/1356

danyj avatar Dec 04 '17 13:12 danyj

@danyj Tnx for help. Now I can make admin part even better, than I planned before.

And how can I get options values on front-end?

sollerpolt avatar Dec 04 '17 13:12 sollerpolt

And how can I get options values on front-end?

https://github.com/ThemeFuse/Unyson/issues/1356

danyj avatar Dec 04 '17 13:12 danyj