'Sidebar', 'id' => 'sidebar', 'before_widget' => '
', 'after_widget' => '

', 'before_title' => '', ) ); } add_action( 'widgets_init', 'ballyhoo_widgets_init' ); function ballyhoo_footer_widgets_init() { register_sidebar( array( 'name' => 'Footer 1', 'id' => 'footer-1', 'before_widget' => '
', 'after_widget' => '

', 'before_title' => '', ) ); } add_action('widgets_init', 'ballyhoo_footer_widgets_init'); function ballyhoo_footer_2_widgets_init() { register_sidebar( array( 'name' => 'Footer 2', 'id' => 'footer-2', 'before_widget' => '
', 'after_widget' => '

', 'before_title' => '', ) ); } add_action('widgets_init', 'ballyhoo_footer_2_widgets_init'); function ballyhoo_footer_3_widgets_init() { register_sidebar( array( 'name' => 'Footer 3', 'id' => 'footer-3', 'before_widget' => '
', 'after_widget' => '

', 'before_title' => '', ) ); } add_action('widgets_init', 'ballyhoo_footer_3_widgets_init'); wp_enqueue_style( 'google-fonts-code', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,700' ); // The Add Theme Support section - code that lets WordPress know our theme supports particular features add_theme_support('status'); add_theme_support('title-tag'); add_theme_support('post-formats', array('aside', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video', 'audio')); add_theme_support('related-posts'); add_theme_support('post-thumbnails'); add_theme_support('jetpack-responsive-videos'); add_theme_support('automatic-feed-links'); add_theme_support('wp-block-styles'); add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list', 'gallery', 'caption', ) ); add_theme_support( 'gutenberg', array( 'wide-images' => true, 'colors' => array( '#ffffff', '#111111', '#cccccc', ), ) ); $defaults = array( 'default-color' => '#ffffff', 'default-image' => '' ); add_theme_support('custom-background', $defaults); $args = array( 'default-image' => get_template_directory_uri(), '/imgs/book.jpg', 'width' => 1400, 'height' => 400, 'flex-height' => false, 'flex-width' => false, 'uploads' => true, 'random-default' => false, 'header-text' => true, 'default-text-color' => '#111111', 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); add_theme_support( 'custom-header', $args); add_theme_support('custom-logo'); function ballyhoo_the_custom_logo() { if ( function_exists( 'the_custom_logo' ) ) { the_custom_logo(); } } function bh_woocommerce_support() { add_theme_support( 'ballyhoo' ); } add_action( 'ballyhoo','bh_woocommerce_support' ); add_theme_support( 'wc-product-gallery-zoom' ); add_theme_support( 'wc-product-gallery-lightbox' ); add_theme_support( 'wc-product-gallery-slider' ); function ballyhoo_add_woocommerce_support() { add_theme_support( 'ballyhoo', array( 'thumbnail_image_width' => 150, 'single_image_width' => 300, 'product_grid' => array( 'default_rows' => 3, 'min_rows' => 2, 'max_rows' => 8, 'default_columns' => 4, 'min_columns' => 2, 'max_columns' => 5, ), ) ); } add_action( 'after_setup_theme', 'ballyhoo_add_woocommerce_support' ); remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); // End Add Theme Support section // Functions to register and carry out Theme Customization functions function ballyhoo_customize_register($wp_customize) { $wp_customize->add_setting( 'font_family' , array( 'default' => 'Open Sans', 'sanitize_callback' => 'sanitize_font_family', 'transport' => 'refresh', )); $wp_customize->add_section('theme_options', array( 'title' => __('Theme Options', 'ballyhoo'), 'priority' => '170', )); $wp_customize->add_control('font__family', array( 'label' => __( 'Font Family', 'ballyhoo' ), 'description' => 'Select a font family from below', 'section' => 'theme_options', 'settings' => 'font_family', 'default' => 'Open Sans', 'type' => 'select', 'choices' => array( 'Arial' => 'Arial', 'Arima Madurai' => 'Arima Madurai', 'Atma' => 'Atma', 'Assistant' => 'Assistant', 'Calibri' => 'Calibri', 'Chivo' => 'Chivo', 'Cinzel Decorative' => 'Cinzel Decorative', 'Comic Sans MS' => 'Comic Sans MS', 'Comfortaa' => 'Comfortaa', 'Exo' => 'Exo', 'Fira Sans' => 'Fira Sans', 'Georgia' => 'Georgia', 'Heebo' => 'Heebo', 'Kalam' => 'Kalam', 'Khula' => 'Khula', 'Lato' => 'Lato', 'Lucida Console' => 'Lucida Console', 'Lucida Handwriting' => 'Lucida Handwriting', 'Merriweather' => 'Merriweather', 'Monaco' => 'Monaco', 'Mali' => 'Mali', 'Mitr' => 'Mitr', 'Muli' => 'Muli', 'Montserrat' => 'Montserrat', 'Mukta' => 'Mukta', 'Nunito' => 'Nunito', 'Open Sans' => 'Open Sans (default)', 'Open Sans Condensed' => 'Open Sans Condensed', 'Overpass' => 'Overpass', 'Overpass Mono' => 'Overpass Mono', 'Oxygen' => 'Oxygen', 'Poppins' => 'Poppins', 'Raleway' => 'Raleway', 'Roboto' => 'Roboto', 'Roboto Mono' => 'Roboto Mono', 'Roboto Slab' => 'Roboto Slab', 'Rubik' => 'Rubik', 'Times New Roman' => 'Times New Roman', 'Titillium Web' => 'Titillium Web', 'Ubuntu' => 'Ubuntu', 'Verdana' => 'Verdana', 'Work Sans' => 'Work Sans', 'Yantramanav' => 'Yantramanav', ), ) ); } add_action( 'customize_register', 'ballyhoo_customize_register' ); $bh_font_preference = get_theme_mod('font__family', 'Open Sans'); function sanitize_font_family( $default_family ) { if ( ! in_array( $default_family, array( 'Arial', 'Arima Madurai', 'Atma', 'Assistant', 'Calibri', 'Chivo', 'Cinzel Decorative', 'Comic Sans MS', 'Comfortaa', 'Exo', 'Fira Sans', 'Georgia', 'Heebo', 'Kalam', 'Khula', 'Lato', 'Lucida Console', 'Lucida Handwriting', 'Merriweather', 'Monaco', 'Mali', 'Mitr', 'Muli', 'Montserrat', 'Mukta', 'Nunito', 'Open Sans', 'Open Sans (default)', 'Open Sans Condensed', 'Overpass', 'Overpass Mono', 'Oxygen', 'Poppins', 'Raleway', 'Roboto', 'Roboto Mono', 'Roboto Slab', 'Rubik', 'Times New Roman', 'Titillium Web', 'Ubuntu', 'Verdana', 'Work Sans', 'Yantramanav') ) ) { $default_family = 'Open Sans'; } return $default_family; } // End Theme Customization Functions // Custom functions - functions exclusive to this theme - see ballyhoo.calumchilds.com/documentation/functions for documentation function ballyhoo_slug_editor_styles() { wp_enqueue_style( 'ballyhoo-slug-editor-style', get_template_directory_uri() . '/editor-style.css' ); } add_action( 'enqueue_block_editor_assets', 'ballyhoo_slug_editor_styles' ); if ( ! isset( $content_width ) ) : $content_width = 900; endif; // ballyhoo_index_post(); outputs different code based on the post-type defined between the two brackets // For example: the default post type is defined as ballyhoo_index_post('normal'); // If nothing is there between the two brackets, the code for the Normal post type will be outputted. function ballyhoo_index_post($post_type) { ?>
>

>

>

>

>

>

>

>

>