WordPress Customizer is a very powerful. Not only because we have a live preview, but also because it got a lot of build-in input type. And we can also extend it or create our own reuse-able input type. This is not a full tutorial but only explaining the concept, but you can check the full working code here: This is a useful control, we can use it for various settings for example: Reorder element, such as header, navigation menu, thumbnail, excerpt, etc. Sharing buttons. etc.. So what we need to do is: Figure out the data structure to save this settings, Create custom customizer control. Use it. Data structure: In this sortable checkboxes data, we need to save all the checkboxes value (not only the selected checkbox, but all checkboxes), but we also need to save each as active (selected) or inactive (not selected) for example we have sharing button: Facebook, Twitter, Google+, we can save the data in array: $data = array(    'facebook' => true,    'twitter' => true,    'google' => false, ); To make it easier, I prefer to save the data as a string using comma “,” to separate the services (checkboxes) and use colon “:” for inactive/active status for each services. here’s the example
Share This