esc_html__( 'Main Menu', 'bulk' ), ) ); add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 300, 300, true ); add_image_size( 'bulk-single', 1170, 460, true ); // Add Custom Background Support. $args = array( 'default-color' => 'ffffff', ); add_theme_support( 'custom-background', $args ); add_theme_support( 'custom-logo', array( 'height' => 70, 'width' => 200, 'flex-height' => true, 'flex-width' => true, 'header-text' => array( 'site-title', 'site-description' ), ) ); // Adds RSS feed links to for posts and comments. add_theme_support( 'automatic-feed-links' ); // WooCommerce support. add_theme_support( 'woocommerce' ); // Recommend plugins. add_theme_support( 'recommend-plugins', array( 'elementor' => array( 'name' => esc_html__( 'Elementor', 'bulk' ), 'active_filename' => 'elementor/elementor.php', ), ) ); } endif; /** * Set Content Width */ function bulk_content_width() { $GLOBALS['content_width'] = apply_filters( 'bulk_content_width', 1170 ); } add_action( 'after_setup_theme', 'bulk_content_width', 0 ); /** * Register custom fonts. */ function bulk_fonts_url() { $fonts_url = ''; /** * Translators: If there are characters in your language that are not * supported by Libre Franklin, translate this to 'off'. Do not translate * into your own language. */ $libre_franklin = _x( 'on', 'Roboto Condensed font: on or off', 'bulk' ); if ( 'off' !== $libre_franklin ) { $font_families = array(); $font_families[] = 'Roboto Condensed:300,300i,400,400i,600,600i,800,800i'; $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); } return esc_url_raw( $fonts_url ); } /** * Enqueue Styles (normal style.css and bootstrap.css) */ function bulk_theme_stylesheets() { // Add custom fonts, used in the main stylesheet. wp_enqueue_style( 'bulk-fonts', bulk_fonts_url(), array(), null ); wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.css', array(), '3.3.7' ); // Theme stylesheet. wp_enqueue_style( 'bulk-stylesheet', get_stylesheet_uri() ); } add_action( 'wp_enqueue_scripts', 'bulk_theme_stylesheets' ); /** * Register Bootstrap JS with jquery */ function bulk_theme_js() { wp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.7', true ); wp_enqueue_script( 'bulk-theme-js', get_template_directory_uri() . '/js/customscript.js', array( 'jquery' ), '1.0.1', true ); } add_action( 'wp_enqueue_scripts', 'bulk_theme_js' ); /** * Register Custom Navigation Walker include custom menu widget to use walkerclass */ require_once( trailingslashit( get_template_directory() ) . 'lib/wp_bootstrap_navwalker.php' ); /** * Recommended plugins */ include_once( trailingslashit( get_template_directory() ) . 'lib/plugin-activation.php' ); /** * Register Custom Metaboxes */ require_once( trailingslashit( get_template_directory() ) . 'lib/metaboxes.php' ); add_action( 'widgets_init', 'bulk_widgets_init' ); /** * Register the Sidebar(s) */ function bulk_widgets_init() { register_sidebar( array( 'name' => esc_html__( 'Right Sidebar', 'bulk' ), 'id' => 'bulk-right-sidebar', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer Section', 'bulk' ), 'id' => 'bulk-footer-area', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } function bulk_main_content_width_columns() { $columns = '12'; if ( is_active_sidebar( 'bulk-right-sidebar' ) ) { $columns = $columns - 3; } echo absint( $columns ); } if ( !function_exists( 'bulk_posted_on' ) ) : /** * Prints HTML with meta information for the current post-date/time and author. */ function bulk_posted_on() { // Get the author name; wrap it in a link. $byline = sprintf( /* translators: %s: post author */ __( 'by %s', 'bulk' ), '' . get_the_author() . '' ); // Finally, let's write all of this to the page. echo '' . bulk_time_link() . ' ' . $byline . ''; } endif; if ( !function_exists( 'bulk_time_link' ) ) : /** * Gets a nicely formatted string for the published date. */ function bulk_time_link() { $time_string = ''; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = ''; } $time_string = sprintf( $time_string, get_the_date( DATE_W3C ), get_the_date(), get_the_modified_date( DATE_W3C ), get_the_modified_date() ); // Wrap the time string in a link, and preface it with 'Posted on'. return sprintf( /* translators: %s: post date */ __( 'Posted on %s', 'bulk' ), '' . $time_string . '' ); } endif; if ( !function_exists( 'bulk_entry_footer' ) ) : /** * Prints HTML with meta information for the categories, tags and comments. */ function bulk_entry_footer() { /* translators: used between list items, there is a space after the comma */ $separate_meta = __( ', ', 'bulk' ); // Get Categories for posts. $categories_list = get_the_category_list( $separate_meta ); // Get Tags for posts. $tags_list = get_the_tag_list( '', $separate_meta ); // We don't want to output .entry-footer if it will be empty, so make sure its not. if ( $categories_list || $tags_list ) { echo '
'; if ( 'post' === get_post_type() ) { if ( $categories_list || $tags_list ) { // Make sure there's more than one category before displaying. if ( $categories_list ) { echo ''; } if ( $tags_list ) { echo ''; } } } if ( comments_open() ) : echo '
'; comments_popup_link( esc_html__( 'Leave a Comment', 'bulk' ), esc_html__( 'One Comment', 'bulk' ), esc_html__( '% Comments', 'bulk' ), 'comments-link', esc_html__( 'Comments are off for this post', 'bulk' ) ); echo '
'; endif; edit_post_link(); echo '
'; } } endif; if ( !function_exists( 'bulk_generate_construct_footer' ) ) : /** * Build footer */ add_action( 'bulk_generate_footer', 'bulk_generate_construct_footer' ); function bulk_generate_construct_footer() { ?> ID, 'header_options_transparent-header', true ); if ( $transparent == '1' ) { $classes[] = 'transparent-header'; } } } return $classes; } endif; if ( !function_exists( 'bulk_custom_head_color' ) ) : /** * Generate color for homepage header */ add_action( 'wp_head', 'bulk_custom_head_color' ); function bulk_custom_head_color() { global $post; if ( !empty( $post ) ) { if ( is_page_template( 'template-parts/template-homepage.php' ) ) { $color = get_post_meta( $post->ID, 'header_options_header-font-color', true ); if ( $color != '' ) { ?>