get_template_directory_uri() .'/styling/img/header.jpg', 'width' => 1920, 'height' => 600, 'uploads' => true, ); add_theme_support( 'custom-header', $defaults ); // Menus register_nav_menus(array( 'primary' => esc_html__('Primary Menu', 'munix'), )); // 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' ); // Custom Backgrounds add_theme_support( 'custom-background', array( 'default-color' => 'ffffff', ) ); // To use additional css add_editor_style( 'styling/css/editor-style.css' ); } add_action( 'after_setup_theme', 'munix_theme_setup' ); } // Register Nav Walker class_alias require get_template_directory(). '/class-wp-bootstrap-navwalker.php'; require get_template_directory(). '/extras.php'; /** * Enqueue CSS stylesheets */ if( ! function_exists( 'munix_enqueue_styles' ) ) { function munix_enqueue_styles() { wp_enqueue_style('munix-font', 'https://fonts.googleapis.com/css?family=Josefin+Sans:300,400,600,700|Open+Sans:300,400,600,700',''); wp_enqueue_style('bootstrap', get_template_directory_uri() . '/styling/css/bootstrap.css',''); wp_enqueue_style('font-awesome', get_template_directory_uri() .'/styling/css/font-awesome.css',''); wp_enqueue_style('owl-carousel', get_template_directory_uri() .'/styling/css/owl.carousel.css',''); wp_enqueue_style('owl-theme', get_template_directory_uri() .'/styling/css/owl.theme.default.css',''); wp_enqueue_style('slicknav', get_template_directory_uri() .'/styling/css/slicknav.css',''); wp_enqueue_style('smoothbox', get_template_directory_uri() .'/styling/css/smoothbox.css',''); // main style wp_enqueue_style( 'munix-style', get_stylesheet_uri() ); wp_enqueue_style('responsive', get_template_directory_uri() .'/styling/css/responsive.css',''); } add_action( 'wp_enqueue_scripts', 'munix_enqueue_styles' ); } /** * Enqueue JS scripts */ if( ! function_exists( 'munix_enqueue_scripts' ) ) { function munix_enqueue_scripts() { wp_enqueue_script('jquery'); wp_enqueue_script('bootstrap', get_template_directory_uri() . '/styling/js/bootstrap.js',array(),'', true); wp_enqueue_script('owl-carousel', get_template_directory_uri() . '/styling/js/owl.carousel.js',array(),'', true); wp_enqueue_script('slicknav', get_template_directory_uri() . '/styling/js/jquery.slicknav.js',array(),'', true); wp_enqueue_script('smoothbox', get_template_directory_uri() . '/styling/js/smoothbox.jquery2.js',array(),'', true); wp_enqueue_script('custom', get_template_directory_uri() . '/styling/js/custom.js',array(),'', true); } add_action( 'wp_enqueue_scripts', 'munix_enqueue_scripts' ); } function munix_cat_count_span($links) { $links = str_replace(' (', ' ', $links); $links = str_replace(')', '', $links); return $links; } add_filter('wp_list_categories', 'munix_cat_count_span'); function munix_style_the_archive_count($links) { $links = str_replace(' (', ' ', $links); $links = str_replace(')', '', $links); return $links; } add_filter('get_archives_link', 'munix_style_the_archive_count'); //post excerpt function munix_theme_excerpt_global_length( $length ) { return 30; } function munix_theme_excerpt(){ add_filter( 'excerpt_length', 'munix_theme_excerpt_global_length', 999 ); echo get_the_excerpt(); } function new_excerpt_more( $more ) { return '...'; } add_filter('excerpt_more', 'new_excerpt_more'); /** * Register sidebars for munix */ function munix_sidebars() { // Blog Sidebar register_sidebar(array( 'name' => esc_html__( 'Blog Sidebar', "munix"), 'id' => 'blog-sidebar', 'description' => esc_html__( 'Sidebar on the blog layout.', "munix"), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); // Footer Sidebar register_sidebar(array( 'name' => esc_html__( 'Footer Widget Area 1', "munix"), 'id' => 'munix-footer-widget-area-1', 'description' => esc_html__( 'The footer widget area 1', "munix"), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => esc_html__( 'Footer Widget Area 2', "munix"), 'id' => 'munix-footer-widget-area-2', 'description' => esc_html__( 'The footer widget area 2', "munix"), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => esc_html__( 'Footer Widget Area 3', "munix"), 'id' => 'munix-footer-widget-area-3', 'description' => esc_html__( 'The footer widget area 3', "munix"), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); register_sidebar(array( 'name' => esc_html__( 'Footer Widget Area 4', "munix"), 'id' => 'munix-footer-widget-area-4', 'description' => esc_html__( 'The footer widget area 4', "munix"), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', )); } add_action( 'widgets_init', 'munix_sidebars' ); /** * Comment layout */ function munix_comments( $comment, $args, $depth ) { ?>
id=""> comment_approved == '0') : ?>

array( 'media-object','' ) )); ?>
$depth, 'max_depth' => $args['max_depth']))) ?>
'; return $form; } endif; add_filter( 'get_search_form', 'munix_customize_search_form', 15 ); ?>