100, 'width' => 400, 'flex-height' => true, 'flex-width' => true, 'header-text' => array('site-title', 'site-description'), ); add_theme_support('custom-logo', $defaults); } endif; add_action('after_setup_theme', 'brikshya_portffolio_custom_logo_setup'); /*-----------------------------------------------------------------------------------*/ /* Register main menu for Wordpress use /*-----------------------------------------------------------------------------------*/ register_nav_menus( array( 'primary' => __('Primary Menu', 'brikshya-blog'), // Register the Primary menu // Copy and paste the line above right here if you want to make another menu, // just change the 'primary' to another name ) ); /*-----------------------------------------------------------------------------------*/ /* Activate sidebar for Wordpress use /*-----------------------------------------------------------------------------------*/ function brikshya_register_sidebars() { register_sidebar(array( // Start a series of sidebars to register 'id' => 'primary_sidebar', // Make an ID 'name' => 'Primary Sidebar', // Name it 'description' => 'Take it on the side...', // Dumb description for the admin side 'before_widget' => '
', // What to display before each widget 'after_widget' => '
', // What to display following each widget 'before_title' => '

', // What to display before each widget's title 'after_title' => '

', // What to display following each widget's title 'empty_title' => '', // What to display in the case of no title defined for a widget // Copy and paste the lines above right here if you want to make another sidebar, // just change the values of id and name to another word/name )); // footer sidebar1 register_sidebar(array( // Start a series of sidebars to register 'id' => 'footer_sidebar1', // Make an ID 'name' => 'Footer Sidebar-1', // Name it 'description' => 'Take it on the side...', // Dumb description for the admin side 'before_widget' => '
', // What to display before each widget 'after_widget' => '
', // What to display following each widget 'before_title' => '

', // What to display before each widget's title 'after_title' => '

', // What to display following each widget's title 'empty_title' => '', // What to display in the case of no title defined for a widget // Copy and paste the lines above right here if you want to make another sidebar, // just change the values of id and name to another word/name )); //footer sidebar2 register_sidebar(array( // Start a series of sidebars to register 'id' => 'footer_sidebar2', // Make an ID 'name' => 'Footer Sidebar-2', // Name it 'description' => 'Take it on the side...', // Dumb description for the admin side 'before_widget' => '
', // What to display before each widget 'after_widget' => '
', // What to display following each widget 'before_title' => '

', // What to display before each widget's title 'after_title' => '

', // What to display following each widget's title 'empty_title' => '', // What to display in the case of no title defined for a widget // Copy and paste the lines above right here if you want to make another sidebar, // just change the values of id and name to another word/name )); // footersidebar3 register_sidebar(array( // Start a series of sidebars to register 'id' => 'footer_sidebar3', // Make an ID 'name' => 'Footer Sidebar-3', // Name it 'description' => 'Take it on the side...', // Dumb description for the admin side 'before_widget' => '
', // What to display before each widget 'after_widget' => '
', // What to display following each widget 'before_title' => '

', // What to display before each widget's title 'after_title' => '

', // What to display following each widget's title 'empty_title' => '', // What to display in the case of no title defined for a widget // Copy and paste the lines above right here if you want to make another sidebar, // just change the values of id and name to another word/name )); } // adding sidebars to Wordpress (these are created in functions.php) add_action('widgets_init', 'brikshya_register_sidebars'); /*-----------------------------------------------------------------------------------*/ /* Enqueue Styles and Scripts /*-----------------------------------------------------------------------------------*/ function naked_scripts() { // get the theme directory style.css and link to it in the header wp_enqueue_style('bootstrap.min.css', get_stylesheet_directory_uri() . '/assets/css/bootstrap.min.css'); wp_enqueue_style('fonts.PT.Serif', 'https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&display=swap'); wp_enqueue_style('fonts.Poppins', 'https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap'); wp_enqueue_style('fontawesome.css', 'https://use.fontawesome.com/releases/v5.7.2/css/all.css'); wp_enqueue_style('animate.min.css', get_stylesheet_directory_uri() . '/assets/css/animate.min.css'); wp_enqueue_style('bootnavbar.css', get_stylesheet_directory_uri() . '/assets/css/bootnavbar.css'); wp_enqueue_style('blog.css', get_stylesheet_directory_uri() . '/assets/css/blog.css'); wp_enqueue_style('style.css', get_stylesheet_directory_uri() . '/style.css'); wp_enqueue_script('jquery.min.js', get_template_directory_uri() . '/assets/js/jquery.min.js', array(), BRIKSHYA_BLOG, true); wp_enqueue_script('bootstrap.min.js', get_template_directory_uri() . '/assets/js/bootstrap.min.js', array(), BRIKSHYA_BLOG, true); wp_enqueue_script('bootnavbar.js', get_template_directory_uri() . '/assets/js/bootnavbar.js', array(), BRIKSHYA_BLOG, true); wp_enqueue_script('main.js', get_template_directory_uri() . '/assets/js/main.js', array(), BRIKSHYA_BLOG, true); } add_action('wp_enqueue_scripts', 'naked_scripts'); // Register this fxn and allow Wordpress to call it automatcally in the header require_once get_template_directory() . '/inc/widget-recentPosts.php'; require_once get_template_directory() . '/inc/class-wp-bootstrap-navwalker.php'; require_once get_template_directory() . '/inc/custom-customizer.php'; add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( $items, $args ) { if( $args->theme_location == 'primary' ) // return $items.""; return $items." "; return $items; } function post_display_location() { $screens = [ 'post']; foreach ( $screens as $screen ) { add_meta_box( 'post_display_location', // Unique ID 'Post Display Location', // Box title 'post_display_location_box_html', // Content callback, must be of type callable $screen ); } } add_action( 'add_meta_boxes', 'post_display_location' ); function post_display_location_box_html( $post ) { $values = get_post_custom( $post->ID ); $selected = isset( $values['_display_posts_location'] ) ? esc_attr( $values['_display_posts_location'][0] ) : ''; ?>