60 lines
2.2 KiB
PHP
60 lines
2.2 KiB
PHP
|
|
<?php
|
|
/**
|
|
* Create Logo Setting and Upload Control
|
|
*/
|
|
function dis2019_customizer_settings($wp_customize)
|
|
{
|
|
$wp_customize->add_section('dis-2019', array(
|
|
'title' => 'Designisso 2019',
|
|
));
|
|
|
|
$wp_customize->add_setting('dis-2019-event-cat-id');
|
|
|
|
$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-event-cat-id',
|
|
array(
|
|
'label' => __('Event category id', 'dis2019'),
|
|
'section' => 'dis-2019',
|
|
'description' => __('This category will be hidden from the start page.', 'dis2019'),
|
|
'settings' => 'dis-2019-event-cat-id',
|
|
'type' => 'number',
|
|
)));
|
|
|
|
$wp_customize->add_setting('dis-2019-event-cat-slug');
|
|
|
|
$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-event-cat-slug',
|
|
array(
|
|
'label' => __('Event category slug', 'dis2019'),
|
|
'section' => 'dis-2019',
|
|
'description' => __('This category will be hidden from the start page. Write category slug here', 'dis2019'),
|
|
'settings' => 'dis-2019-event-cat-slug',
|
|
)));
|
|
|
|
$wp_customize->add_setting('dis-2019-posts-on-home');
|
|
|
|
$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-posts-on-home',
|
|
array(
|
|
'label' => __('Number of posts on homepage', 'dis2019'),
|
|
'section' => 'dis-2019',
|
|
'description' => __('Use 6*n+2 numbers, e.g. 8, 14, 20, 26...', 'dis2019'),
|
|
'settings' => 'dis-2019-posts-on-home',
|
|
'type' => 'number',
|
|
)));
|
|
|
|
$wp_customize->add_setting('dis-2019-posts-on-tag');
|
|
|
|
$wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-posts-on-tag',
|
|
array(
|
|
'label' => __('Number of posts on tag archives', 'dis2019'),
|
|
'section' => 'dis-2019',
|
|
'description' => __('Be, do, think, love pages. Use 6*n-2 numbers, e.g. 4, 10, 16, 22... ', 'dis2019'),
|
|
'settings' => 'dis-2019-posts-on-tag',
|
|
'type' => 'number',
|
|
)));
|
|
|
|
//__('Choose from most used writer', 'dis2019')
|
|
// get_theme_mod( 'dis-2019-posts-on-home' );
|
|
}
|
|
add_action('customize_register', 'dis2019_customizer_settings');
|
|
|
|
?>
|