Browse Source

Merge pull request #3875 from Automattic/add_better_no_posts_text_on_frontpage

Seedlet: Update text and link when there are no published posts
Ben Dwyer 4 years ago
parent
commit
3f7489392f
1 changed files with 12 additions and 12 deletions
  1. 12 12
      seedlet/template-parts/content/content-none.php

+ 12 - 12
seedlet/template-parts/content/content-none.php

@@ -12,26 +12,26 @@
 
 <section class="no-results not-found">
 	<header class="page-header default-max-width">
-		<h1 class="page-title"><?php _e( 'Nothing Found', 'seedlet' ); ?></h1>
+		<h1 class="page-title"><?php _e( 'No posts published yet!', 'seedlet' ); ?></h1>
 	</header><!-- .page-header -->
 
 	<div class="page-content default-max-width">
 		<?php
 		if ( is_home() && current_user_can( 'publish_posts' ) ) :
+			?>
 
-			printf(
-				'<p>' . wp_kses(
+			<p>
+			<?php _e( "Your site is set to show the the most recent posts on your homepage - but you don't have any Posts published.", 'seedlet' ); ?></p>
+			<p>
+				<a href="<?php echo esc_url( admin_url( 'edit.php' ) ); ?>" class="button">
+					<?php
 					/* translators: 1: link to WP admin new post page. */
-					__( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', 'seedlet' ),
-					array(
-						'a' => array(
-							'href' => array(),
-						),
-					)
-				) . '</p>',
-				esc_url( admin_url( 'post-new.php' ) )
-			);
+					_e( 'Add or publish Posts', 'seedlet' );
+					?>
+				</a>
+			</p>
 
+			<?php
 		elseif ( is_search() ) :
 			?>