Wordpress Theme Customizer API | Custom Theme Option

PHOTO EMBED

Mon May 30 2022 22:19:05 GMT+0000 (Coordinated Universal Time)

Saved by @mickeldav #php

function theme_customizer_function($wp_customize)
{
	$wp_customize->add_panel('theme_options', array(
		'title' => 'Theme Options',
		'priority' => 10,
		'capability' => 'edit_theme_options',
	));
	$wp_customize->add_section('landing_page_slider', array(
		'title' => 'Slider Section',
		'description' => __('Home Page Slider Customization'),
		'panel' => 'theme_options',
	));
	$wp_customize->add_setting('landing_main_heading', array(
		'default' => __('Some Text Here')
	));
	$wp_customize->add_control('landing_main_heading', array(
		'label' => 'Main Heading',
		'section' => 'landing_page_slider',
		'priority' => 1
	));

}
add_action('customize_register', 'theme_customizer_function');
content_copyCOPY

Wordpress Theme Customizer API | Custom Theme Option for wp custom theme For get theme option value <?php echo get_theme_mod('landing_main_heading', ''); ?>