I’m working on a custom WP theme that displays all “pages” as sections in a one page layout.
What I would like to do is add a color chooser to the page designer, so that the user can choose a color to be the background color of that section.
I’m totally new to wordpress so I don’t even know what files or functions to look at to add this behavior.
Is there perhaps a prebuilt plugin to do something like this?
Four options:
use a plugin like Advanced Custom Fields or Custom Content Type Manager
ACF has a Lite version to add the meta box programmatically
a helper script like Custom Metaboxes and Fields for WordPress
do it yourself, using this Q&A as example: Add a checkbox to post screen that adds a class to the title
Probably, you’d want to change the visibility of the meta box according to the chosen page template, refer to this Q&A: Custom meta box shown when template is chosen