get_template_directory_uri() .'/assets/images/detail-blog-baner.jpg',
'width' => 1920,
'height' => 540,
'uploads' => true,
);
add_theme_support( 'custom-header', $defaults );
// add excerpt support for pages
add_post_type_support( 'page', 'excerpt' );
if ( is_singular() && comments_open() ) {
wp_enqueue_script( 'comment-reply' );
}
// Add theme support for selective refresh for widgets.
add_theme_support( 'customize-selective-refresh-widgets' );
// Menus
register_nav_menus(array(
'primary' => esc_html__('Primary Menu', 'bizstart'),
));
// Custom Backgrounds
add_theme_support( 'custom-background', array(
'default-color' => 'ffffff',
) );
// To use additional css
add_editor_style( 'assets/css/editor-style.css' );
}
add_action( 'after_setup_theme', 'bizstart_theme_setup' );
}
/*add filter to change logo class*/
add_filter('get_custom_logo','bizstart_logo_class');
function bizstart_logo_class($html)
{
$html = str_replace('custom-logo-link', 'navbar-brand', $html);
return $html;
}
// Register Nav Walker class_alias
require_once('class-wp-bootstrap-navwalker.php');
require get_template_directory(). '/include/extras.php';
/**
* Enqueue CSS stylesheets
*/
if( ! function_exists( 'bizstart_enqueue_styles' ) ) {
function bizstart_enqueue_styles() {
/* ======= Google Font ========= */
wp_enqueue_style('main_font', 'https://fonts.googleapis.com/css?family=Raleway:300,400,500,600,700');
wp_enqueue_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.css');
wp_enqueue_style('animate', get_template_directory_uri() .'/assets/css/animate.css');
wp_enqueue_style('bootstrapnav', get_template_directory_uri() . '/assets/css/bootsnav.css');
wp_enqueue_style('font-awesome', get_template_directory_uri() .'/assets/css/font-awesome.css');
wp_enqueue_style('carousel', get_template_directory_uri() .'/assets/css/owl.carousel.css');
wp_enqueue_style('theme', get_template_directory_uri() .'/assets/css/owl.theme.default.css');
wp_enqueue_style('space', get_template_directory_uri() .'/assets/css/space.css');
wp_enqueue_style('header', get_template_directory_uri() .'/assets/css/header.css');
// main style
wp_enqueue_style( 'bizstart-style', get_stylesheet_uri() );
wp_enqueue_style('responsive', get_template_directory_uri() .'/assets/css/responsive.css');
wp_enqueue_style('color', get_template_directory_uri() .'/assets/css/blue-color.css');
}
add_action( 'wp_enqueue_scripts', 'bizstart_enqueue_styles' );
}
/**
* Enqueue JS scripts
*/
if( ! function_exists( 'bizstart_enqueue_scripts' ) ) {
function bizstart_enqueue_scripts() {
wp_enqueue_script('jquery');
wp_enqueue_script('bootstrap', get_template_directory_uri() . '/assets/js/bootstrap.js',array(),'', true);
wp_enqueue_script('bootsnav', get_template_directory_uri() . '/assets/js/bootsnav.js',array(),'', true);
wp_enqueue_script('carousel', get_template_directory_uri() . '/assets/js/owl.carousel.js',array(),'', true);
wp_enqueue_script('animation', get_template_directory_uri() . '/assets/js/wow.js','', true);
wp_enqueue_script('main', get_template_directory_uri() . '/assets/js/main.js',array(),'', true);
wp_enqueue_script('modernizer', get_template_directory_uri() . '/assets/js/Modernizr.js',array(),'', true);
}
add_action( 'wp_enqueue_scripts', 'bizstart_enqueue_scripts' );
}
/**
* Register sidebars for bizstart
*/
function bizstart_sidebars() {
// Blog Sidebar
register_sidebar(array(
'name' => esc_html__( 'Blog Sidebar', "bizstart"),
'id' => 'blog-sidebar',
'description' => esc_html__( 'Sidebar on the blog layout.', "bizstart"),
'before_widget' => '
',
'after_widget' => '
',
'before_title' => '',
));
// Footer Sidebar
register_sidebar(array(
'name' => esc_html__( 'Footer Widget Area 1', "bizstart"),
'id' => 'bizstart-footer-widget-area-1',
'description' => esc_html__( 'The footer widget area 1', "bizstart"),
'before_widget' => ' ',
'after_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => esc_html__( 'Footer Widget Area 2', "bizstart"),
'id' => 'bizstart-footer-widget-area-2',
'description' => esc_html__( 'The footer widget area 2', "bizstart"),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '
',
));
register_sidebar(array(
'name' => esc_html__( 'Footer Widget Area 3', "bizstart"),
'id' => 'bizstart-footer-widget-area-3',
'description' => esc_html__( 'The footer widget area 3', "bizstart"),
'before_widget' => '',
'after_widget' => '',
'before_title' => '',
'after_title' => '
',
));
}
add_action( 'widgets_init', 'bizstart_sidebars' );
/**
* Comment layout
*/
function bizstart_comments( $comment, $args, $depth ) { ?>
id="li-comment-">
comment_approved == '0') : ?>
';
echo '';
// main breadcrumbs lead to homepage
echo '
' . '' . $home . '' . '' . $delimiter . ' ';
// if blog page exists
if ( 'page' == get_option( 'show_on_front' ) && get_option( 'page_for_posts' ) ) {
echo '
' . '' . esc_html__( 'Blog', 'bizstart' ) . '' . $delimiter . ' ';
}
if ( is_category() ) {
$thisCat = get_category( get_query_var( 'cat' ), false );
if ( $thisCat->parent != 0 ) {
$category_link = get_category_link( $thisCat->parent );
echo '
' . '' . get_cat_name( $thisCat->parent ) . '' . '' . $delimiter . ' ';
}
echo '
' . '' . get_the_archive_title() . '' . '';
} elseif ( is_single() && !is_attachment() ) {
if ( get_post_type() != 'post' ) {
$post_type = get_post_type_object( get_post_type() );
$link = get_post_type_archive_link( get_post_type() );
if ( $link ) {
printf( '
%s', esc_url( $link ), $post_type->labels->name );
echo ' ' . $delimiter . ' ';
}
echo get_the_title();
} else {
$category = get_the_category();
if ( $category ) {
foreach ( $category as $cat ) {
echo '
' . '' . $cat->name . '' . '' . $delimiter . ' ';
}
}
echo '
';
echo get_the_title();
echo '';
}
} elseif ( !is_single() && !is_page() && get_post_type() != 'post' && !is_404() && !is_search() ) {
$post_type = get_post_type_object( get_post_type() );
echo $post_type->labels->singular_name;
} elseif ( is_attachment() ) {
$parent = get_post( $post->post_parent );
echo '
' . '' . $parent->post_title . '' . '';
echo ' ' . $delimiter . ' ' . get_the_title();
} elseif ( is_page() && !$post->post_parent ) {
echo '
' . get_the_title() . '';
} elseif ( is_page() && $post->post_parent ) {
$parent_id = $post->post_parent;
$breadcrumbs = array();
while ( $parent_id ) {
$page = get_post( $parent_id );
$breadcrumbs[] = '
' . '' . get_the_title( $page->ID ) . '' . '';
$parent_id = $page->post_parent;
}
$breadcrumbs = array_reverse( $breadcrumbs );
for ( $i = 0; $i < count( $breadcrumbs ); $i++ ) {
echo $breadcrumbs[ $i ];
if ( $i != count( $breadcrumbs ) - 1 )
echo ' ' . $delimiter . ' ';
}
echo $delimiter . '
' . '' . the_title_attribute( 'echo=0' ) . '' . '';
}
elseif ( is_tag() ) {
echo '
' . '' . get_the_archive_title() . '' . '';
} elseif ( is_author() ) {
global $author;
$userdata = get_userdata( $author );
echo '
' . '' . $userdata->display_name . '' . '';
} elseif ( is_404() ) {
echo esc_html__( 'Error 404', 'bizstart' );
} elseif ( is_search() ) {
echo esc_html__( 'Search results for', 'bizstart' ) . ' ' . get_search_query();
} elseif ( is_day() ) {
echo '
' . '' . get_the_time( 'Y' ) . '' . '' . $delimiter . ' ';
echo '
' . '' . get_the_time( 'F' ) . '' . '' . $delimiter . ' ';
echo '
' . '' . get_the_time( 'd' ) . '' . ' ';
} elseif ( is_month() ) {
echo '
' . '' . get_the_time( 'Y' ) . '' . '' . $delimiter . ' ';
echo '
' . '' . get_the_time( 'F' ) . '' . '';
} elseif ( is_year() ) {
echo '
' . '' . get_the_time( 'Y' ) . '' . ' ';
}
if ( get_query_var( 'paged' ) ) {
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() )
echo ' (';
echo esc_html__( 'Page', 'bizstart' ) . ' ' . get_query_var( 'paged' );
if ( is_category() || is_day() || is_month() || is_year() || is_search() || is_tag() || is_author() )
echo ')';
}
echo '
';
}
}
endif;
/**
* Customizer additions.
*/
require get_template_directory(). '/include/customizer.php';
?>
$depth, 'max_depth' => $args['max_depth']))) ?>