Update author.php for 2.0.0
- Keep the existing structure, the .entry-title.search heading and the_content(). - Escape the author name and use the super-simple-wp-theme text domain. - Correct the visible label from the Bokmaal "Forfatter" to Nynorsk "Forfattar".
This commit is contained in:
1 parent
3912ecc7e2
commit
3d89f1fd4e
1 file changed
+24
-13
+24
-13
@@ -1,24 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* Author archive template.
|
||||
*
|
||||
* @package Super_Simple_WP_Theme
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
$author = get_the_author_meta("display_name", get_the_author_meta("ID"));
|
||||
printf("<h2 class=\"entry-title search\">" . __("Forfatter: ", "textdomain") . $author . "</h2>\n");
|
||||
$sswt_author = get_the_author_meta( 'display_name', get_the_author_meta( 'ID' ) );
|
||||
|
||||
if (have_posts()) :
|
||||
while (have_posts()) : the_post();
|
||||
$sswt_heading = sprintf(
|
||||
/* translators: %s: author display name. */
|
||||
__( 'Forfattar: %s', 'super-simple-wp-theme' ),
|
||||
$sswt_author
|
||||
);
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</article>
|
||||
<h2 class="entry-title search"><?php echo esc_html( $sswt_heading ); ?></h2>
|
||||
<?php
|
||||
|
||||
endwhile;
|
||||
if ( have_posts() ) :
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
|
||||
<div class="entry-content">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</article>
|
||||
<?php
|
||||
endwhile;
|
||||
endif;
|
||||
|
||||
get_footer();
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user