';
bloginfo('name');
echo " ";
if (is_category() || is_single()) {
the_category(',');
if (is_single()) {
echo " ";
the_title();
echo " ";
}
} elseif (is_page()) {
the_title();
}
}
}
/* Theme Setup */
if (!function_exists('blogger_hub_setup')):
function blogger_hub_setup() {
$GLOBALS['content_width'] = apply_filters('blogger_hub_content_width', 640);
load_theme_textdomain('blogger-hub', get_template_directory().'/languages');
add_theme_support('automatic-feed-links');
add_theme_support('post-thumbnails');
add_theme_support('title-tag');
add_theme_support('custom-logo', array(
'height' => 240,
'width' => 240,
'flex-height' => true,
));
add_image_size('blogger-hub-homepage-thumb', 240, 145, true);
register_nav_menus(array(
'primary' => __('Primary Menu', 'blogger-hub'),
));
add_theme_support('custom-background', array(
'default-color' => 'f1f1f1',
));
/*
* This theme styles the visual editor to resemble the theme style,
* specifically font, colors, icons, and column width.
*/
add_editor_style(array('css/editor-style.css', blogger_hub_font_url()));
}
endif;
add_action('after_setup_theme', 'blogger_hub_setup');
/* Theme Widgets Setup */
function blogger_hub_widgets_init() {
register_sidebar(array(
'name' => __('Blog Sidebar', 'blogger-hub'),
'description' => __('Appears on blog page sidebar', 'blogger-hub'),
'id' => 'sidebar-1',
'before_widget' => '',
'before_title' => '
',
));
register_sidebar(array(
'name' => __('Page Sidebar', 'blogger-hub'),
'description' => __('Appears on page sidebar', 'blogger-hub'),
'id' => 'sidebar-2',
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Third Column Sidebar', 'blogger-hub'),
'description' => __('Appears on page sidebar', 'blogger-hub'),
'id' => 'sidebar-3',
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Home Page Sidebar', 'blogger-hub'),
'description' => __('Appears on hone page', 'blogger-hub'),
'id' => 'home-page',
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 1', 'blogger-hub'),
'description' => __('Appears on footer', 'blogger-hub'),
'id' => 'footer-1',
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 2', 'blogger-hub'),
'description' => __('Appears on footer', 'blogger-hub'),
'id' => 'footer-2',
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 3', 'blogger-hub'),
'description' => __('Appears on footer', 'blogger-hub'),
'id' => 'footer-3',
'before_widget' => '',
'before_title' => '',
));
register_sidebar(array(
'name' => __('Footer 4', 'blogger-hub'),
'description' => __('Appears on footer', 'blogger-hub'),
'id' => 'footer-4',
'before_widget' => '',
'before_title' => '',
));
}
add_action('widgets_init', 'blogger_hub_widgets_init');
/* Theme Font URL */
function blogger_hub_font_url() {
$font_url = '';
$font_family = array();
$font_family[] = 'PT Sans:300,400,600,700,800,900';
$font_family[] = 'Montserrat:300,400,600,700,800,900';
$font_family[] = 'IM+Fell+English+SC';
$font_family[] = 'Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i';
$query_args = array(
'family' => urlencode(implode('|', $font_family)),
);
$font_url = add_query_arg($query_args, '//fonts.googleapis.com/css');
return $font_url;
}
/*radio button sanitization*/
function blogger_hub_sanitize_choices($input, $setting) {
global $wp_customize;
$control = $wp_customize->get_control($setting->id);
if (array_key_exists($input, $control->choices)) {
return $input;
} else {
return $setting->default;
}
}
/* Theme enqueue scripts */
function blogger_hub_scripts() {
wp_enqueue_style('blogger-hub-font', blogger_hub_font_url(), array());
wp_enqueue_style('bootstrap', get_template_directory_uri().'/css/bootstrap.css');
wp_enqueue_style('blogger-hub-basic-style', get_stylesheet_uri());
wp_style_add_data('blogger-hub-style', 'rtl', 'replace');
wp_enqueue_style('blogger-hub-effect', get_template_directory_uri().'/css/effect.css');
wp_enqueue_style('font-awesome', get_template_directory_uri().'/css/fontawesome-all.css');
wp_enqueue_script('blogger-hub-custom-scripts-jquery', get_template_directory_uri().'/js/custom.js', array('jquery'), '', true);
if (is_singular() && comments_open() && get_option('thread_comments')) {
wp_enqueue_script('comment-reply');
}
wp_enqueue_style('blogger-hub-ie', get_template_directory_uri().'/css/ie.css', array('blogger-hub-basic-style'));
wp_style_add_data('blogger-hub-ie', 'conditional', 'IE');
}
add_action('wp_enqueue_scripts', 'blogger_hub_scripts');
/* Theme Credit link */
define('BLOGGER_HUB_SITE_URL', 'https://www.themesglance.com/');
function blogger_hub_credit_link() {
echo "".esc_html__('ThemesGlance', 'blogger-hub')."";
}
/* Custom template tags for this theme. */
require get_template_directory().'/inc/template-tags.php';
/* Customizer additions. */
require get_template_directory().'/inc/customizer.php';
/* Implement the Custom Header feature. */
require get_template_directory().'/inc/custom-header.php';