'; } endif; add_action( 'business_key_action_breadcrumb', 'business_key_add_breadcrumb', 10 ); if ( ! function_exists( 'business_key_customize_banner_title' ) ) : /** * Customize banner title. * * @since 1.0.0 * * @param string $title Title. * @return string Modified title. */ function business_key_customize_banner_title( $title ) { if ( is_home() ) { $title = business_key_get_option( 'blog_title' ); } elseif ( is_singular() ) { $title = single_post_title( '', false ); } elseif ( is_category() || is_tag() ) { $title = single_term_title( '', false ); } elseif ( is_archive() ) { $title = strip_tags( get_the_archive_title() ); } elseif ( is_search() ) { /* translators: %s: search term */ $title = sprintf( esc_html__( 'Search Results for: %s', 'business-key' ), get_search_query() ); } elseif ( is_404() ) { $title = esc_html__( '404!', 'business-key' ); } return $title; } endif; add_filter( 'business_key_filter_banner_title', 'business_key_customize_banner_title' ); if ( ! function_exists( 'business_key_add_sidebar' ) ) : /** * Add sidebar. * * @since 1.0.0 */ function business_key_add_sidebar() { global $post; $global_layout = business_key_get_option( 'global_layout' ); $global_layout = apply_filters( 'business_key_filter_theme_global_layout', $global_layout ); // Check if single template. if ( $post && is_singular() ) { $post_options = get_post_meta( $post->ID, 'business_key_settings', true ); if ( isset( $post_options['post_layout'] ) && ! empty( $post_options['post_layout'] ) ) { $global_layout = $post_options['post_layout']; } } // Include primary sidebar. if ( 'no-sidebar' !== $global_layout ) { get_sidebar(); } // Include secondary sidebar. switch ( $global_layout ) { case 'three-columns': get_sidebar( 'secondary' ); break; default: break; } } endif; add_action( 'business_key_action_sidebar', 'business_key_add_sidebar' );