Create Topic

WP Tavern Forums Create Topic

Create New 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.






Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.