'ffffff' ); add_theme_support( 'custom-background', $nimbus_custom_background_defaults ); // Register Menus register_nav_menu('primary', __('Primary Menu', 'nimbus')); // Set Content Width global $content_width; if (!isset($content_width)) { $content_width = 1168; } } endif; /* **************************************************************************************************** */ // Clear Helper/s /* **************************************************************************************************** */ function nimbus_clear($ht = "0") { echo "
"; } /* **************************************************************************************************** */ // Do Title /* **************************************************************************************************** */ add_action('wp_title', 'nimbus_title'); function nimbus_title() { global $wp_query; $title = get_bloginfo('name'); $seporate = ' | '; if (is_page() || is_single()) { $postid = $wp_query->post->ID; $title = the_title('','',false) . $seporate . get_bloginfo('name'); } wp_reset_query(); return $title; } /* **************************************************************************************************** */ // Modify Search Form /* **************************************************************************************************** */ function nimbus_modify_search_form($form) { $form = '
'; if (is_search()) { $form .=''; } else { $form .=''; } $form .= '
'; return $form; } add_filter('get_search_form', 'nimbus_modify_search_form'); /* **************************************************************************************************** */ // Override gallery style /* **************************************************************************************************** */ add_filter( 'use_default_gallery_style', '__return_false' ); /* **************************************************************************************************** */ // More Tag /* **************************************************************************************************** */ function nimbus_wrap_more_tag($link){ return "

$link

"; } add_filter('the_content_more_link', 'nimbus_wrap_more_tag'); /* **************************************************************************************************** */ // Register Sidebars /* **************************************************************************************************** */ add_action('widgets_init', 'nimbus_register_sidebars'); function nimbus_register_sidebars() { register_sidebar(array( 'name' => __('Default Page Sidebar', 'nimbus'), 'id' => 'sidebar_pages', 'description' => __('Widgets in this area will be displayed in the sidebar on the pages.', 'nimbus'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Default Blog Sidebar', 'nimbus'), 'id' => 'sidebar_blog', 'description' => __('Widgets in this area will be displayed in the sidebar on the blog and posts.', 'nimbus'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Footer Left', 'nimbus'), 'id' => 'footer-left', 'description' => __('Widgets in this area will be shown in the left footer column.', 'nimbus'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Footer Center', 'nimbus'), 'id' => 'footer-center', 'description' => __('Widgets in this area will be shown in the center footer column.', 'nimbus'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); register_sidebar(array( 'name' => __('Footer Right', 'nimbus'), 'id' => 'footer-right', 'description' => __('Widgets in this area will be shown in the right footer column.', 'nimbus'), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

' )); // frontpage - about register_sidebar(array( 'id' => 'frontpage-about', 'name' => __('Frontpage About', 'nimbus' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); // frontpage - team - left register_sidebar(array( 'id' => 'frontpage-team-left', 'name' => __('Frontpage Team Left', 'nimbus' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); // frontpage - team - center left register_sidebar(array( 'id' => 'frontpage-team-center-left', 'name' => __('Frontpage Team Center Left', 'nimbus' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); // frontpage - team - center right register_sidebar(array( 'id' => 'frontpage-team-center-right', 'name' => __('Frontpage Team Center Right', 'nimbus' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); // frontpage - team - right register_sidebar(array( 'id' => 'frontpage-team-right', 'name' => __('Frontpage Team Right', 'nimbus' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); // create 50 alternate sidebar widget areas for use on post and pages $i = 1; while ($i <= 50) { register_sidebar(array( 'name' => __('Alternate Sidebar #', 'nimbus') . $i, 'id' => 'sidebar_' . $i, 'description' => __('Widgets in this area will be displayed in the sidebar for any posts or pages that are tagged with sidebar', 'nimbus') . $i . '.', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

' )); $i++; } } // ################################################# // Custom Widgets // ################################################# require_once(get_template_directory() . '/inc/widgets.php'); // ################################################# // Custom NavWalker // ################################################# require_once(get_template_directory() . '/inc/wp_bootstrap_navwalker.php'); /* **************************************************************************************************** */ // Excerpt Modifications /* **************************************************************************************************** */ // Excerpt Length add_filter('excerpt_length', 'nimbus_excerpt_length'); function nimbus_excerpt_length($length) { return 30; } // Excerpt More add_filter('excerpt_more', 'nimbus_excerpt_more'); function nimbus_excerpt_more($more) { return ''; } // Add to pages add_action('init', 'nimbus_add_excerpts_to_pages'); function nimbus_add_excerpts_to_pages() { add_post_type_support('page', 'excerpt'); } function nimbus_get_the_excerpt_by_id($post_id) { global $post; $save_post = $post; $post = get_post($post_id); $output = get_the_excerpt(); $post = $save_post; return $output; } /* **************************************************************************************************** */ // Enable Threaded Comments /* **************************************************************************************************** */ add_action('wp_enqueue_scripts', 'nimbus_threaded_comments'); function nimbus_threaded_comments() { if (is_singular() && comments_open() && (get_option('thread_comments') == 1)) { wp_enqueue_script('comment-reply'); } } /* **************************************************************************************************** */ // Modify Comments Output /* **************************************************************************************************** */ if (!function_exists('nimbus_comment')){ function nimbus_comment($comment, $args, $depth) { $GLOBALS['comment'] = $comment; ?>
  • id="comment-">

    __('Leave a Reply', 'nimbus'), 'depth' => $depth, 'max_depth' => $args['max_depth']))) ?>


    comment_approved == '0') { ?>
  • -