First, you will need to generate customizer settings depending on the current user. So there are two conditions to be met: the setting must only be accessible to the current user and this setting must be unique to him.
// Only do this for contributors and up
if (current_user_can('edit_posts')) {
// retrieve author id
global $current_user;
get_currentuserinfo();
$author_id = $current_user->ID
// generate customizer setting for this author only
$wp_customize->add_setting( 'header_color_' . $author_id , array(
'default' => '#000',
'sanitize_callback' => 'sanitize_hex_color',
'capability' => 'edit_posts',
));
In (the heading of) your author.php
you will need to get the id of the author of the current page to retrieve the relevant mod.
$author_id = get_the_author_meta('ID');
get_mod('header_color_' . $author_id);
Related Posts:
- Where is Customizer related data stored is the database?
- Repeater field in Customizer
- Adjust the Device Preview sizes used in the WP 4.5 Customizer
- WP Customizer – Prevent live preview
- How to print the value of a custom control in the Customizer?
- Customizer JS API dynamically add sections and controls
- Theme customizer – possible to disable Live Preview?
- Theme Customization API options on install
- Why does get_theme_mod return blank (or default value) but get_option returns saved value?
- Get current post ID of customizer preview window
- Add button to Customizer
- How to add theme customizer control to specific page?
- Customizer active callback live toggle controls
- Why is remove_setting and remove_control not working?
- What is the difference between sanitize_text_field() and wp_filter_nohtml_kses()?
- Customizer Issue, Default Settings not working
- How to move Menus customizer section directly under Site Identity?
- WP customizer + gulp + browsersync = refused to display in iframe?
- Rename and rearrange customizer section
- Theme Customizer Custom Background / Header Image
- get_theme_mod not working
- Customizer not saving image settings
- Theme Customizer – My panel disappears
- Author functions don’t work in customizer’s selective refresh
- How to remove mixed content warnings in WP Customizer
- Using Theme Customizer Built-In Sections
- How to use rgba color from theme customizer color picker
- Theme Customizer changes are dissappearing when change page
- Customizer Selective Refresh doesn’t refresh properly with saved value
- WordPress Customizer sanitize_callback: How to Reset to Default on Fail
- site identity section name?
- WordPress code editor VS customizer “built-in CSS editor”?
- How do i remove the ‘WooCommerce’ section from Customizer in Twenty Sixteen Theme?
- Customizer options
- Issue with Customizer: only last field shown in section
- How do i add edit shortcut icon in wordpress without using selective refresh
- Dynamic IDs in WordPress Customizer value bindings
- Custom panel/section link styling in customizer
- Customizer chokes on my theme in 4.9, where should I be looking?
- Theme Customizer – Text without a setting (a comment or tag)
- Translations appear in the WP Customizer, but not on the website!
- How To Remove or Hide Appearance->Background from Admin Menu
- Custom switch not hiding sub-fields on Customizer’s load
- WordPress Customizer Selective Refresh: works only on first setting change
- How to use WP_Customize_Cropped_Image_Control settings in the customizer preview?
- WordPress Customizer: Why widgets and nav_menus are components, not panel or section?
- Add customiser controls directly to a panel
- How to use sanitize_callback?
- datepicker works on widgets options page, but not on customizer
- How to make customizer settings appear only when image is uploaded?
- get_theme_mod Not Functioning Properly
- How to add width & height (resolution) on wordpress function?
- WordPress Customizer Panels in separate files
- My background color customizer doesnt work
- Function has_custom_logo when used in Customizer
- theme customizer issue
- WordPress Include ‘print_f’ in WP_Customize_Control array [closed]
- doubble scroll bar on wordpress home page [closed]
- WordPress Customizer allow line break
- Hooks to watch customizer value change
- How to add UI buttons in customizer like twentyseventeen
- How do you add a link in the description of one section of the customizer to another section in a different panel?
- Get WordPress page Id inside customizer
- How to delete old custom-css-stuff in the customizer-live-preview?
- Output values from Customizer isn’t working
- What is the id for the widgets section of the WordPress theme customizer?
- No option to select home page in theme customizer
- How to import and export settings from live customizer?
- WP 3.8 theme customizer error
- Initialize WordPress customizer variables
- Adding custom link with get parameter to a menu button
- WordPress navigation URL became hashed URL automatically
- Want to permanently remove pagination number page/2/ in WordPress
- How to make a block for header font styling at customizer via function.php?
- Customizer – binding jQuery created controls
- @font-face in Customize Control
- customizer not working when ever i activate ssl
- add a section in wordpress theme to upload image and process it
- Broken Customizer After Migration To The Skeleton Architecture
- Creating default object from empty value in wp_customize?
- Exiting Customizer alert
- Fetch customizer image and output as an inline css style background image
- Why is my custom WordPress Customizer section disappearing after about a second?
- Hide Customizer Setting on ‘ready’
- Manipulating customizer panels and fields?
- Issues Saving Long String Option
- Use the customiser to set the background-image of a div
- WordPress Customizer Not Setting Custom Settings or Controls
- Disable customizer control sorting within sections
- WordPress Customizer Hides my Sections / Controls inside of is_admin()
- Default Customizer Code
- How to work around case sensitivity of HEX values?
- WP Theme Customizer – Responsive Elements
- My stylesheet doesn’t appear in theme-editor
- Customizer sanitize_callback for input type number
- How to check WP Customize Control
- Custom logo manage by customizer and theme options
- Issue displaying customiser setting with get_theme_mod
- How to add CSS to head by php through echo self::css();
- How to override javascript in customize-controls.js