I fixed your functions.php
code:
<?php
add_theme_support('post-thumbnails');
add_theme_support('menus');
/**
* Enqueue scripts
*
* @param string $handle Script name
* @param string $src Script url
* @param array $deps (optional) Array of script names on which this script depends
* @param string|bool $ver (optional) Script version (used for cache busting), set to null to disable
* @param bool $in_footer (optional) Whether to enqueue the script before </head> or before </body>
*/
function theme_styles() {
wp_enqueue_style('bootstrap_css', get_template_directory_uri() . '/css/bootstrap.min.css');
wp_enqueue_style('main_css', get_template_directory_uri() . '/style.css');
wp_enqueue_style('owl_carousel_css', get_template_directory_uri() . '/owl_carousel/dist/assets/owl.carousel.min.css');
wp_enqueue_style('owl_carousel_theme_css', get_template_directory_uri() . '/owl_carousel/dist/assets/owl.theme.default.min.css');
wp_enqueue_style('font-awesome', get_template_directory_uri() . '/font-awesome47/css/font-awesome.min.css');
}
add_action('wp_enqueue_scripts', 'theme_styles');
/**
* Enqueue scripts
*
* @param string $handle Script name
* @param string $src Script url
* @param array $deps (optional) Array of script names on which this script depends
* @param string|bool $ver (optional) Script version (used for cache busting), set to null to disable
* @param bool $in_footer (optional) Whether to enqueue the script before </head> or before </body>
*/
function theme_js() {
global $wp_scripts;
wp_enqueue_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js', array(), null, true);
wp_enqueue_script('bootstrap_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), false, false);
wp_enqueue_script('owl_carousel', get_template_directory_uri() . '/owl_carousel/dist/owl.carousel.min.js', array('jquery'), false, true);
}
add_action('wp_enqueue_scripts', 'theme_js');
function create_post_type() {
register_post_type('slider', array(
'labels' => array(
'name' => __('Slider'),
'signular_name' => __('Slider')
),
'public' => true,
'has_archive' => false,
'supports' => array(
'title',
'editor',
'excerpt',
'thumbnail',
'custom-fields',
'revisions'
)
)
);
}
add_action('init', 'create_post_type');
function mytheme_customize_register($wp_customize) {
$wp_customize->add_section('themeslug_logo_section', array(
'title' => __('Logo', 'themeslug'),
'priority' => 30,
'description' => 'Upload a logo to replace the default site name and
description in the header',
));
$wp_customize->add_setting('themeslug_logo');
$wp_customize->add_control(new WP_Customize_Image_Control(
$wp_customize, 'themeslug_logo', array(
'label' => __('Logo', 'themeslug'),
'section' => 'themeslug_logo_section',
'settings' => 'themeslug_logo',
)));
}
add_action('customize_register', 'mytheme_customize_register');
/*
* Register Our Customizer Stuff Here
*/
function genesischild_register_theme_customizer($wp_customize) {
// Create custom panel.
$wp_customize->add_panel('text_blocks', array(
'priority' => 500,
'theme_supports' => '',
'title' => __('Text Blocks', 'agrowinnica'),
'description' => __('Set editable text for certain content.', 'agrowinnica'),
));
// Add Footer Text
// Add section.
$wp_customize->add_section('custom_footer_text', array(
'title' => __('Change Footer Text', 'agrowinnica'),
'panel' => 'text_blocks',
'priority' => 10
));
$wp_customize->add_section('big_text', array(
'title' => __('Duży tekst', 'agrowinnica'),
));
// Add setting
$wp_customize->add_setting('footer_text_block', array(
'default' => __('default text', 'agrowinnica'),
'sanitize_callback' => 'sanitize_text'
));
$wp_customize->add_setting('big_text_block', array(
'default' => __('default text', 'agrowinnica'),
'sanitize_callback' => 'sanitize_text'
));
// Add control
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize, 'custom_footer_text', array(
'label' => __('Footer Text', 'agrowinnica'),
'section' => 'custom_footer_text',
'settings' => 'footer_text_block',
'type' => 'text'
)
)
);
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize, 'big_text', array(
'label' => __('Duży tekst', 'agrowinnica'),
'section' => 'big_text',
'settings' => 'big_text_block',
'type' => 'text'
)
)
);
// Sanitize text
function sanitize_text($text) {
return sanitize_text_field($text);
}
}
add_action('customize_register', 'genesischild_register_theme_customizer');
function wpb_widgets_init() {
register_sidebar(array(
'name' => 'Custom Header Widget Area',
'id' => 'custom-header-widget',
'before_widget' => '<div class="chw-widget">',
'after_widget' => '</div>',
'before_title' => '<h2 class="chw-title">',
'after_title' => '</h2>',
));
register_sidebar(array(
'name' => 'Footer Sidebar 1',
'id' => 'footer-sidebar-1',
'description' => 'Appears in the footer area',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
));
register_sidebar(array(
'name' => 'O nas',
'id' => 'o-nas',
'description' => 'O nas',
'before_widget' => '<div id="one" class="two">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
register_sidebar(array(
'name' => 'O naso',
'id' => 'studio-text',
'description' => 'Studia',
'before_widget' => '<div id="one" class="two">',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>'
));
}
add_action('widgets_init', 'wpb_widgets_init', 0);
your wpb_widgets_init
function for the widget areas was inside genesischild_register_theme_customizer
also there was one area outside.