<?php
require get_template_directory() . '/customizer.php'; //calls the customizer file where the logo is set

function my_scripts() {
    // Register the script like this for a plugin:
    wp_register_script( 'custom-script', plugins_url( '/js/custom-script.js', __FILE__ ) );
    // or
    // Register the script like this for a theme:
    wp_register_script( 'custom-script', get_template_directory_uri() . 'assets/js/owl.carousel.min.js' );
		wp_register_script( 'custom-script', get_template_directory_uri() . 'assets/js/popper.min.js' );
		wp_register_script( 'custom-script', get_template_directory_uri() . 'assets/js/scrollIt.min.js' );

    // For either a plugin or a theme, you can then enqueue the script:
    wp_enqueue_script( 'custom-script' );
}
add_action( 'wp_enqueue_scripts', 'my_scripts' );




function genesis_post_thumbnails() {
    add_theme_support( 'post-thumbnails' );
}
add_action( 'after_setup_theme', 'genesis_post_thumbnails' );
if (!function_exists('genesis_the_custom_logo')) {

    function genesis_the_custom_logo() {

        $output = '';
        if (function_exists('get_custom_logo')):
            if (has_custom_logo()) {
                $image = wp_get_attachment_image_src(get_theme_mod('custom_logo'), 'full');
                $output = '<img src="' . $image[0] . '" class="img-fluid"/>';
            } else {
                $output = get_bloginfo('name');
            }
        endif;
        // Nothing in the output: Custom Logo is not supported, or there is no selected logo
        // In both cases we display the site's name
        if (empty($output)) {
            $output = get_bloginfo('name');
        }
        echo '<a class="navbar-brand" href="' . esc_url(home_url('/')) . '">' . $output . '</a>';
    }

}
//Main navigation menu
function register_my_menus() {
  register_nav_menus(
    array(
      'main-menu' => __( 'Main Menu' ),
      'footer-menu' => __( 'Footer Menu' )
    )
  );
}
add_action( 'init', 'register_my_menus' );


// Sidebars & Widgetizes Areas
add_action('widgets_init', 'genesis_register_sidebars');

function genesis_register_sidebars() {

  register_sidebar(array(
        'id' => 'sidebar2',
        'name' => 'Sidebar 1',
        'description' => 'Used on every page BUT the homepage page template.',
        'before_widget' => '<div id="%1$s" class="widget sidebar-box %2$s">',
        'after_widget' => '</div>',
        'before_title' => '<h4 class="widgettitle">',
        'after_title' => '</h4>',
    ));

    register_sidebar(array(
      'id' => 'footersection',
      'name' => 'Footer section',
      'before_widget' => '<div id="%1$s" class="widget %2$s">',
      'after_widget' => '</div>',
      'before_title' => '<h3 class="widgettitle">',
      'after_title' => '</h3>',
  ));

  register_sidebar(array(
    'id' => 'top_bar_contacts',
    'name' => 'Top bar contacts',
    'before_widget' => '<div id="%1$s" class="widget %2$s">',
    'after_widget' => '</div>',
    'before_title' => '<h3 class="widgettitle">',
    'after_title' => '</h3>',
));

register_sidebar(array(
  'id' => 'top_bar_social_media',
  'name' => 'Top bar social media',
  'before_widget' => '<div id="%1$s" class="widget %2$s">',
  'after_widget' => '</div>',
  'before_title' => '<h3 class="widgettitle">',
  'after_title' => '</h3>',
));
register_sidebar(array(
  'id' => 'ugandapopularpackages',
  'name' => 'Uganda popular packages',
  'before_widget' => '<div id="%1$s" class="widget %2$s">',
  'after_widget' => '</div>',
  'before_title' => '<h3 class="widgettitle">',
  'after_title' => '</h3>',
));
register_sidebar(array(
  'id' => 'rwandapackages',
  'name' => 'Rwanda popular packages',
  'before_widget' => '<div id="%1$s" class="widget %2$s">',
  'after_widget' => '</div>',
  'before_title' => '<h3 class="widgettitle">',
  'after_title' => '</h3>',
));




  }














?>
