'#fcfcfc', 'default-image' => '', 'wp-head-callback' => '_custom_background_cb', 'admin-head-callback' => '', 'admin-preview-callback' => '' ); add_theme_support( 'custom-background', $defaults ); add_theme_support( 'custom-logo' ); // main nav in header (not sticky) register_nav_menus( array( 'primary' => __('Main Menu Top', 'appeal'), 'author_modal' => __('Author Links PopUp', 'appeal') ) ); load_theme_textdomain( 'appeal', get_template_directory_uri() . '/languages' ); } add_action('after_setup_theme','appeal_theme_support'); function appeal_theme_custom_logo() { // Try to retrieve the Custom Logo $output = ''; if (function_exists('get_custom_logo')) $output = ''; // 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 = ''; echo $output; } /** * page excerpt support * @init * add_post__support */ function appeal_theme_excerpt_support() { add_post_type_support( 'page', 'excerpt' ); } add_action( 'init', 'appeal_theme_excerpt_support' ); //include (enqueue) scripts and stylesheets function appeal_theme_scripts() { wp_register_style( 'appeal-google-fonts', 'http://fonts.googleapis.com/css?family=Raleway', false ); // For use of child themes wp_register_style( 'appeal-style', get_stylesheet_directory_uri() . '/style.css', array(), null, 'all' ); wp_enqueue_style( 'appeal-google-fonts'); wp_enqueue_style( 'appeal-style' ); wp_enqueue_script( 'bootstrap-script', get_template_directory_uri() . '/assets/bootstrap.js', array ( 'jquery' ), '3.3.7', true); wp_register_script( 'navwalker-script', get_template_directory_uri() . '/assets/wp_bootstrap_navwalker.php'); wp_enqueue_script( 'navwalker-script', get_template_directory_uri() . '/assets/wp_bootstrap_navwalker.php'); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'wp_enqueue_scripts', 'appeal_theme_scripts' ); /** * Implementation of the Custom Header feature. * * @link https://developer.wordpress.org/themes/functionality/custom-headers/ * * @uses appeal_header_style() */ function appeal_custom_header_setup() { add_theme_support( 'custom-header', apply_filters( 'appeal_custom_header_args', array( 'default-image' => get_template_directory_uri() . '/assets/default-header-img.jpg', 'default-text-color' => '0000a0', 'width' => 1000, 'height' => 250, 'flex-height' => true, 'flex-width' => true, 'wp-head-callback' => 'appeal_theme_header_style', ) ) ); } add_action( 'after_setup_theme', 'appeal_custom_header_setup' ); if ( ! function_exists( 'appeal_theme_header_style' ) ) : function appeal_theme_header_style() { $header_text_color = get_header_textcolor(); $header_image = get_header_image(); if ( $header_image ) { ?> '; if ( ! display_header_text() ) { echo ' .site-title, .site-description { position: absolute; clip: rect(1px, 1px, 1px, 1px);'; } else { echo ' .site-title a, .site-description { color: '; ?> #; '; } endif; // Set unknown media content width $GLOBALS['content_width'] = 750; // Sidebar and Footer declarations function appeal_register_sidebars() { register_sidebar(array( 'id' => 'sidebar-right', 'name' => __('Right Sidebar', 'appeal'), 'description' => __('Used on every page.', 'appeal'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'id' => 'sidebar-left', 'name' => __('Left Sidebar', 'appeal'), 'description' => __('Used on every page.', 'appeal'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'id' => 'footer-left', 'name' => __('Footer Left', 'appeal'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'id' => 'footer-middle', 'name' => __('Footer Middle', 'appeal'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'id' => 'footer-right', 'name' => __('Footer Right', 'appeal'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'appeal_register_sidebars' ); /** * Header for singular articles * Add pingback url auto-discovery header for singular articles. */ function appeal_pingback_header() { if ( is_singular() && pings_open() ) { printf( '' . "\n", get_bloginfo( 'pingback_url' ) ); } } add_action( 'wp_head', 'appeal_pingback_header' ); // Register Custom Navigation Walker require_once get_template_directory() . '/assets/wp_bootstrap_navwalker.php'; //Register Customizer assets require_once get_template_directory() . '/customize.php'; ?>