' . esc_html( $read_more_text ) . '
'; } return $output; } endif; if ( ! function_exists( 'business_era_hook_read_more_filters' ) ) : /** * Hook read more and excerpt length filters. * * @since 1.0.0 */ function business_era_hook_read_more_filters() { if ( is_home() || is_category() || is_tag() || is_author() || is_date() || is_search() ) { add_filter( 'excerpt_length', 'business_era_implement_excerpt_length', 999 ); add_filter( 'the_content_more_link', 'business_era_content_more_link', 10, 2 ); add_filter( 'excerpt_more', 'business_era_implement_read_more' ); } } endif; add_action( 'wp', 'business_era_hook_read_more_filters' ); if ( ! function_exists( 'business_era_add_sidebar' ) ) : /** * Add sidebar. * * @since 1.0.0 */ function business_era_add_sidebar() { $global_layout = business_era_get_option( 'global_layout' ); $global_layout = apply_filters( 'business_era_filter_theme_global_layout', $global_layout ); // Include sidebar. if ( 'no-sidebar' !== $global_layout ) { get_sidebar(); } } endif; add_action( 'business_era_action_sidebar', 'business_era_add_sidebar' ); if ( ! function_exists( 'business_era_check_home_page_status' ) ) : /** * Check home page content status. * */ function business_era_check_home_page_status( $status ) { if ( is_front_page() ) { $show_home_content = business_era_get_option( 'show_home_content' ); if ( false === $show_home_content ) { $status = false; } } return $status; } endif; add_action( 'business_era_home_page_content', 'business_era_check_home_page_status' ); /** * Hide archive page prefix * */ if( ! function_exists( 'business_era_archive_prefix_change' ) ): function business_era_archive_prefix_change( $title ) { $archive_prefix = business_era_get_option( 'archive_prefix' ); if( true === $archive_prefix ){ if ( is_category() ) { $title = single_cat_title( '', false ); } elseif ( is_tag() ) { $title = single_tag_title( '', false ); } elseif ( is_author() ) { $title = '' . get_the_author() . ''; } elseif ( is_post_type_archive() ) { $title = post_type_archive_title( '', false ); } elseif ( is_tax() ) { $title = single_term_title( '', false ); } } return $title; } endif; add_filter( 'get_the_archive_title', 'business_era_archive_prefix_change');