term_id, 'headline', true ) ) { $headline = sprintf( '

%s

', bizznis_attr( 'archive-title' ), strip_tags( $headline ) ); } else { if ( bizznis_a11y( 'headings' ) ) { $headline = sprintf( '

%s

', bizznis_attr( 'archive-title' ), strip_tags( $term->name ) ); } } if ( $intro_text = get_term_meta( $term->term_id, 'intro_text', true ) ) { $intro_text = apply_filters( 'bizznis_term_intro_text_output', $intro_text ); } if ( $headline || $intro_text ) { printf( '
%s
', bizznis_attr( 'taxonomy-archive-description' ), $headline . $intro_text ); } } endif; add_filter( 'bizznis_author_intro_text_output', 'wpautop' ); add_action( 'bizznis_loop', 'bizznis_do_author_title_description', 5 ); /** * Add custom headline and description to author archive pages. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_do_author_title_description' ) ) : function bizznis_do_author_title_description() { # Stop here if we're not on an author archive page if ( ! is_author() ) { return; } # If there's a custom headline to display, it is marked up as a level 1 heading. $headline = get_the_author_meta( 'headline', (int) get_query_var( 'author' ) ); if ( '' == $headline && bizznis_a11y( 'headings' ) ) { $headline = get_the_author_meta( 'display_name', (int) get_query_var( 'author' ) ); } $intro_text = get_the_author_meta( 'intro_text', (int) get_query_var( 'author' ) ); # If there's a description (intro text) to display, it is run through 'wpautop()' before being added to a div. $headline = $headline ? sprintf( '

%s

', bizznis_attr( 'archive-title' ), strip_tags( $headline ) ) : ''; $intro_text = $intro_text ? apply_filters( 'bizznis_author_intro_text_output', $intro_text ) : ''; if ( $headline || $intro_text ) { printf( '
%s
', bizznis_attr( 'author-archive-description' ), $headline . $intro_text ); } } endif; add_action( 'bizznis_loop', 'bizznis_do_author_box_archive', 5 ); /** * Add author box to the top of author archive. * * @since 1.0.0 */ if ( ! function_exists( 'bizznis_do_author_box_archive' ) ) : function bizznis_do_author_box_archive() { if ( ! is_author() || get_query_var( 'paged' ) >= 2 ) { return; } if ( get_the_author_meta( 'bizznis_author_box_archive', get_query_var( 'author' ) ) ) { bizznis_author_box( 'archive' ); } } endif; add_action( 'bizznis_loop', 'bizznis_do_date_archive_title', 5 ); /** * Add custom headline and description to date archive pages. * * If we're not on a date archive page, or not on page 1, then nothing extra is displayed. * * * @since 1.2.0 * * @uses bizznis_has_post_type_archive_support() Check if a post type should potentially support an archive setting page. * @uses bizznis_get_cpt_option() Get list of custom post types which need an archive settings page. * @return null Return early if not on relevant post type archive. */ if ( ! function_exists( 'bizznis_do_date_archive_title' ) ) : function bizznis_do_date_archive_title() { if ( ! is_date() ) { return; } if ( is_day() ) { $headline = __( 'Archives for ', 'bizznis' ) . get_the_date(); } elseif ( is_month() ) { $headline = __( 'Archives for ', 'bizznis' ) . single_month_title( ' ', false ); } elseif ( is_year() ) { $headline = __( 'Archives for ', 'bizznis' ) . get_query_var( 'year' ); } if ( $headline ) { printf( '

%s

', bizznis_attr( 'date-archive-description' ), bizznis_attr( 'archive-title' ), strip_tags( $headline ) ); } } endif; add_action( 'bizznis_loop', 'bizznis_do_posts_page_heading', 5 ); /** * Add custom headline and description to assigned posts page. * * If we're not on a posts page, then nothing extra is displayed. * * @since 1.3.0 * @uses bizznis_a11y() Check if a post type should potentially support an archive setting page. * @uses bizznis_do_post_title() Get list of custom post types which need an archive settings page. * @return null Return early if not on relevant posts page. */ if ( ! function_exists( 'bizznis_do_posts_page_heading' ) ) : function bizznis_do_posts_page_heading() { if ( ! bizznis_a11y( 'headings' ) ) { return; } $posts_page = get_option( 'page_for_posts' ); if ( is_null( $posts_page ) ) { return; } if ( ! is_home() || bizznis_is_root_page() ) { return; } printf( '
', bizznis_attr( 'posts-page-description' ) ); printf( '

%s

', bizznis_attr( 'archive-title' ), get_the_title( $posts_page ) ); echo '
'; } endif;