How to make WordPress customizable for clients

WordPress define the Customizer for doing this job. It works in frontend, on default, and you can enhance with your requirements. Also give it easier possibility to live preview of the options. You find a lot of how to here on WPSE and also in the wild of the www.

how to display a widget only on a page where the custom field is defined?

If you have a custom field (metadata) attached to a particular post, page or custom post type, you can do something like the following in your page template file: Example example-template-file.php <?php $sidebar_id = ‘my-custom-sidebar-id’; $my_custom_meta_value = get_post_meta(get_the_ID(), ‘my_custom_meta_key’, true); if ( !empty($my_custom_meta_value) && is_active_sidebar($sidebar_id) ) { dynamic_sidebar($sidebar_id); } ?> Notes: dynamic_sidebar, is_active_sidebar