first
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying post archives and search results
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php get_template_part( 'template-parts/header/excerpt-header', get_post_format() ); ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php get_template_part( 'template-parts/excerpt/excerpt', get_post_format() ); ?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer default-max-width">
|
||||
<?php twenty_twenty_one_entry_meta_footer(); ?>
|
||||
</footer><!-- .entry-footer -->
|
||||
</article><!-- #post-${ID} -->
|
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying a message that posts cannot be found
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<section class="no-results not-found">
|
||||
<header class="page-header alignwide">
|
||||
<?php if ( is_search() ) : ?>
|
||||
|
||||
<h1 class="page-title">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Search term. */
|
||||
esc_html__( 'Results for "%s"', 'twentytwentyone' ),
|
||||
'<span class="page-description search-term">' . esc_html( get_search_query() ) . '</span>'
|
||||
);
|
||||
?>
|
||||
</h1>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<h1 class="page-title"><?php esc_html_e( 'Nothing here', 'twentytwentyone' ); ?></h1>
|
||||
|
||||
<?php endif; ?>
|
||||
</header><!-- .page-header -->
|
||||
|
||||
<div class="page-content default-max-width">
|
||||
|
||||
<?php if ( is_home() && current_user_can( 'publish_posts' ) ) : ?>
|
||||
|
||||
<?php
|
||||
printf(
|
||||
'<p>' . wp_kses(
|
||||
/* translators: %s: Link to WP admin new post page. */
|
||||
__( 'Ready to publish your first post? <a href="%s">Get started here</a>.', 'twentytwentyone' ),
|
||||
array(
|
||||
'a' => array(
|
||||
'href' => array(),
|
||||
),
|
||||
)
|
||||
) . '</p>',
|
||||
esc_url( admin_url( 'post-new.php' ) )
|
||||
);
|
||||
?>
|
||||
|
||||
<?php elseif ( is_search() ) : ?>
|
||||
|
||||
<p><?php esc_html_e( 'Sorry, but nothing matched your search terms. Please try again with some different keywords.', 'twentytwentyone' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php else : ?>
|
||||
|
||||
<p><?php esc_html_e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'twentytwentyone' ); ?></p>
|
||||
<?php get_search_form(); ?>
|
||||
|
||||
<?php endif; ?>
|
||||
</div><!-- .page-content -->
|
||||
</section><!-- .no-results -->
|
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying page content in page.php
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php if ( ! is_front_page() ) : ?>
|
||||
<header class="entry-header alignwide">
|
||||
<?php get_template_part( 'template-parts/header/entry-header' ); ?>
|
||||
<?php twenty_twenty_one_post_thumbnail(); ?>
|
||||
</header><!-- .entry-header -->
|
||||
<?php elseif ( has_post_thumbnail() ) : ?>
|
||||
<header class="entry-header alignwide">
|
||||
<?php twenty_twenty_one_post_thumbnail(); ?>
|
||||
</header><!-- .entry-header -->
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
|
||||
'after' => '</nav>',
|
||||
/* translators: %: Page number. */
|
||||
'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<?php if ( get_edit_post_link() ) : ?>
|
||||
<footer class="entry-footer default-max-width">
|
||||
<?php
|
||||
edit_post_link(
|
||||
sprintf(
|
||||
/* translators: %s: Post title. Only visible to screen readers. */
|
||||
esc_html__( 'Edit %s', 'twentytwentyone' ),
|
||||
'<span class="screen-reader-text">' . get_the_title() . '</span>'
|
||||
),
|
||||
'<span class="edit-link">',
|
||||
'</span>'
|
||||
);
|
||||
?>
|
||||
</footer><!-- .entry-footer -->
|
||||
<?php endif; ?>
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<header class="entry-header alignwide">
|
||||
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
|
||||
<?php twenty_twenty_one_post_thumbnail(); ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
|
||||
'after' => '</nav>',
|
||||
/* translators: %: Page number. */
|
||||
'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer default-max-width">
|
||||
<?php twenty_twenty_one_entry_meta_footer(); ?>
|
||||
</footer><!-- .entry-footer -->
|
||||
|
||||
<?php if ( ! is_singular( 'attachment' ) ) : ?>
|
||||
<?php get_template_part( 'template-parts/post/author-bio' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/**
|
||||
* Template part for displaying posts
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header class="entry-header">
|
||||
<?php if ( is_singular() ) : ?>
|
||||
<?php the_title( '<h1 class="entry-title default-max-width">', '</h1>' ); ?>
|
||||
<?php else : ?>
|
||||
<?php the_title( sprintf( '<h2 class="entry-title default-max-width"><a href="%s">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php twenty_twenty_one_post_thumbnail(); ?>
|
||||
</header><!-- .entry-header -->
|
||||
|
||||
<div class="entry-content">
|
||||
<?php
|
||||
the_content(
|
||||
twenty_twenty_one_continue_reading_text()
|
||||
);
|
||||
|
||||
wp_link_pages(
|
||||
array(
|
||||
'before' => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'twentytwentyone' ) . '">',
|
||||
'after' => '</nav>',
|
||||
/* translators: %: Page number. */
|
||||
'pagelink' => esc_html__( 'Page %', 'twentytwentyone' ),
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer default-max-width">
|
||||
<?php twenty_twenty_one_entry_meta_footer(); ?>
|
||||
</footer><!-- .entry-footer -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Aside post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
// Print the full content.
|
||||
the_content();
|
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Audio post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
$content = get_the_content();
|
||||
|
||||
if ( has_block( 'core/audio', $content ) ) {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/audio', $content );
|
||||
} elseif ( has_block( 'core/embed', $content ) ) {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/embed', $content );
|
||||
} else {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core-embed/*', $content );
|
||||
}
|
||||
|
||||
// Add the excerpt.
|
||||
the_excerpt();
|
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Chat post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
// If there are paragraph blocks, print up to two.
|
||||
// Otherwise this is legacy content, so print the excerpt.
|
||||
if ( has_block( 'core/paragraph', get_the_content() ) ) {
|
||||
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/paragraph', get_the_content(), 2 );
|
||||
} else {
|
||||
|
||||
the_excerpt();
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Gallery post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
// Print the 1st gallery found.
|
||||
if ( has_block( 'core/gallery', get_the_content() ) ) {
|
||||
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/gallery', get_the_content() );
|
||||
}
|
||||
|
||||
the_excerpt();
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Image post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
// If there is no featured-image, print the first image block found.
|
||||
if (
|
||||
! twenty_twenty_one_can_show_post_thumbnail() &&
|
||||
has_block( 'core/image', get_the_content() )
|
||||
) {
|
||||
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/image', get_the_content() );
|
||||
}
|
||||
|
||||
the_excerpt();
|
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Link post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
// Print the 1st instance of a paragraph block. If none is found, print the content.
|
||||
if ( has_block( 'core/paragraph', get_the_content() ) ) {
|
||||
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/paragraph', get_the_content() );
|
||||
} else {
|
||||
|
||||
the_content();
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Quote post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
$content = get_the_content();
|
||||
|
||||
// If there is no quote or pullquote print the content.
|
||||
if ( has_block( 'core/quote', $content ) ) {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/quote', $content );
|
||||
} elseif ( has_block( 'core/pullquote', $content ) ) {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/pullquote', $content );
|
||||
} else {
|
||||
the_excerpt();
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Status post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
// Print the full content.
|
||||
the_content();
|
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the appropriate content for the Video post format.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
$content = get_the_content();
|
||||
|
||||
if ( has_block( 'core/video', $content ) ) {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/video', $content );
|
||||
} elseif ( has_block( 'core/embed', $content ) ) {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core/embed', $content );
|
||||
} else {
|
||||
twenty_twenty_one_print_first_instance_of_block( 'core-embed/*', $content );
|
||||
}
|
||||
|
||||
// Add the excerpt.
|
||||
the_excerpt();
|
@ -0,0 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Show the excerpt.
|
||||
*
|
||||
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
the_excerpt();
|
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* Displays the footer widget area.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
|
||||
|
||||
<aside class="widget-area">
|
||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||
</aside><!-- .widget-area -->
|
||||
|
||||
<?php
|
||||
endif;
|
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/**
|
||||
* Displays the post header
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
the_title( '<h1 class="entry-title">', '</h1>' );
|
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
/**
|
||||
* Displays the post header
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
// Don't show the title if the post-format is `aside` or `status`.
|
||||
$post_format = get_post_format();
|
||||
if ( 'aside' === $post_format || 'status' === $post_format ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<header class="entry-header">
|
||||
<?php
|
||||
the_title( sprintf( '<h2 class="entry-title default-max-width"><a href="%s">', esc_url( get_permalink() ) ), '</a></h2>' );
|
||||
twenty_twenty_one_post_thumbnail();
|
||||
?>
|
||||
</header><!-- .entry-header -->
|
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
/**
|
||||
* Displays header site branding
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
$blog_info = get_bloginfo( 'name' );
|
||||
$description = get_bloginfo( 'description', 'display' );
|
||||
$show_title = ( true === get_theme_mod( 'display_title_and_tagline', true ) );
|
||||
$header_class = $show_title ? 'site-title' : 'screen-reader-text';
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( has_custom_logo() && $show_title ) : ?>
|
||||
<div class="site-logo"><?php the_custom_logo(); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="site-branding">
|
||||
|
||||
<?php if ( has_custom_logo() && ! $show_title ) : ?>
|
||||
<div class="site-logo"><?php the_custom_logo(); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $blog_info ) : ?>
|
||||
<?php if ( is_front_page() && ! is_paged() ) : ?>
|
||||
<h1 class="<?php echo esc_attr( $header_class ); ?>"><?php echo esc_html( $blog_info ); ?></h1>
|
||||
<?php elseif ( is_front_page() && ! is_home() ) : ?>
|
||||
<h1 class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></h1>
|
||||
<?php else : ?>
|
||||
<p class="<?php echo esc_attr( $header_class ); ?>"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></p>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( $description && true === get_theme_mod( 'display_title_and_tagline', true ) ) : ?>
|
||||
<p class="site-description">
|
||||
<?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
</div><!-- .site-branding -->
|
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/**
|
||||
* Displays the site header.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
$wrapper_classes = 'site-header';
|
||||
$wrapper_classes .= has_custom_logo() ? ' has-logo' : '';
|
||||
$wrapper_classes .= ( true === get_theme_mod( 'display_title_and_tagline', true ) ) ? ' has-title-and-tagline' : '';
|
||||
$wrapper_classes .= has_nav_menu( 'primary' ) ? ' has-menu' : '';
|
||||
?>
|
||||
|
||||
<header id="masthead" class="<?php echo esc_attr( $wrapper_classes ); ?>">
|
||||
|
||||
<?php get_template_part( 'template-parts/header/site-branding' ); ?>
|
||||
<?php get_template_part( 'template-parts/header/site-nav' ); ?>
|
||||
|
||||
</header><!-- #masthead -->
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Displays the site navigation.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php if ( has_nav_menu( 'primary' ) ) : ?>
|
||||
<nav id="site-navigation" class="primary-navigation" aria-label="<?php esc_attr_e( 'Primary menu', 'twentytwentyone' ); ?>">
|
||||
<div class="menu-button-container">
|
||||
<button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
|
||||
<span class="dropdown-icon open"><?php esc_html_e( 'Menu', 'twentytwentyone' ); ?>
|
||||
<?php echo twenty_twenty_one_get_icon_svg( 'ui', 'menu' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
||||
</span>
|
||||
<span class="dropdown-icon close"><?php esc_html_e( 'Close', 'twentytwentyone' ); ?>
|
||||
<?php echo twenty_twenty_one_get_icon_svg( 'ui', 'close' ); // phpcs:ignore WordPress.Security.EscapeOutput ?>
|
||||
</span>
|
||||
</button><!-- #primary-mobile-menu -->
|
||||
</div><!-- .menu-button-container -->
|
||||
<?php
|
||||
wp_nav_menu(
|
||||
array(
|
||||
'theme_location' => 'primary',
|
||||
'menu_class' => 'menu-wrapper',
|
||||
'container_class' => 'primary-menu-container',
|
||||
'items_wrap' => '<ul id="primary-menu-list" class="%2$s">%3$s</ul>',
|
||||
'fallback_cb' => false,
|
||||
)
|
||||
);
|
||||
?>
|
||||
</nav><!-- #site-navigation -->
|
||||
<?php
|
||||
endif;
|
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying author info below posts.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Twenty_Twenty_One
|
||||
* @since Twenty Twenty-One 1.0
|
||||
*/
|
||||
|
||||
?>
|
||||
<?php if ( (bool) get_the_author_meta( 'description' ) && post_type_supports( get_post_type(), 'author' ) ) : ?>
|
||||
<div class="author-bio <?php echo get_option( 'show_avatars' ) ? 'show-avatars' : ''; ?>">
|
||||
<?php echo get_avatar( get_the_author_meta( 'ID' ), '85' ); ?>
|
||||
<div class="author-bio-content">
|
||||
<h2 class="author-title">
|
||||
<?php
|
||||
printf(
|
||||
/* translators: %s: Author name. */
|
||||
esc_html__( 'By %s', 'twentytwentyone' ),
|
||||
get_the_author()
|
||||
);
|
||||
?>
|
||||
</h2>
|
||||
<p class="author-description"> <?php the_author_meta( 'description' ); ?></p><!-- .author-description -->
|
||||
<?php
|
||||
printf(
|
||||
'<a class="author-link" href="%1$s" rel="author">%2$s</a>',
|
||||
esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
|
||||
sprintf(
|
||||
/* translators: %s: Author name. */
|
||||
esc_html__( 'View all of %s\'s posts.', 'twentytwentyone' ),
|
||||
get_the_author()
|
||||
)
|
||||
);
|
||||
?>
|
||||
</div><!-- .author-bio-content -->
|
||||
</div><!-- .author-bio -->
|
||||
<?php
|
||||
endif;
|
Reference in New Issue
Block a user