WP Tavern › Forums › Create Topic
Justin Tadlock Second, regarding layout-builder Themes: maybe the best way to implement those is via post custom meta, rather than Theme options? And if they need to be Theme options (e.g. global layout configuration), I, for one, would be willing to entertain an argument for using a Settings page for that. Or maybe there’s some cool way to use the customizer on a per-post, custom post meta, basis? Per-post layout building makes the most sense being stored as post meta. You can do that via the edit post screen in the admin or even via the customizer. There’s actually 4 different methods for storing options with the customizer: Theme mods (default) Single options Serialized options array Something custom (e.g., post meta can work here too) There’s even PHP and JS conditional checks to show specific controls within the customizer.
Justin Tadlock
Second, regarding layout-builder Themes: maybe the best way to implement those is via post custom meta, rather than Theme options? And if they need to be Theme options (e.g. global layout configuration), I, for one, would be willing to entertain an argument for using a Settings page for that. Or maybe there’s some cool way to use the customizer on a per-post, custom post meta, basis?
Per-post layout building makes the most sense being stored as post meta. You can do that via the edit post screen in the admin or even via the customizer. There’s actually 4 different methods for storing options with the customizer:
Theme mods (default) Single options Serialized options array Something custom (e.g., post meta can work here too)
There’s even PHP and JS conditional checks to show specific controls within the customizer.
Name *
Email *
Website:
Topic Title (Maximum Length: 80):
Forum: — No forum —AI and WordPress Articles Blocks Showcase Discussions Events Introductions Jobs and Working in WordPress Podcast Episodes Site and Block Editor
Enter your email address to subscribe to this blog and receive notifications of new posts by email.
Email Address
Submit
Enter the destination URL
Or link to existing content