Skip to content

Commit

Permalink
_s: provide a more helpful message to users with no posts on the home…
Browse files Browse the repository at this point in the history
… page or none at all; See #1112

git-svn-id: https://wpcom-themes.svn.automattic.com/_s/@8917 d957f892-c61d-0410-b221-f235e6eecf30
  • Loading branch information
ianstewart committed Feb 10, 2012
1 parent 93fa346 commit e932aaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
10 changes: 5 additions & 5 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ function _s_setup() {
endif; // _s_setup
add_action( 'after_setup_theme', '_s_setup' );

/**
* Implement the Custom Header feature
*/
//require( get_template_directory() . '/inc/custom-header.php' );

/**
* Register widgetized area and update sidebar with default widgets
*
Expand All @@ -109,3 +104,8 @@ function _s_scripts() {
wp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', 'jquery', '20120206', true );
}
add_action( 'wp_enqueue_scripts', '_s_scripts' );

/**
* Implement the Custom Header feature
*/
//require( get_template_directory() . '/inc/custom-header.php' );
7 changes: 3 additions & 4 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,15 @@

<?php _s_content_nav( 'nav-below' ); ?>

<?php else : ?>
<?php elseif ( current_user_can( 'edit_posts' ) ) : ?>

<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', '_s' ); ?></h1>
<h1 class="entry-title"><?php _e( 'No posts to display', '_s' ); ?></h1>
</header><!-- .entry-header -->

<div class="entry-content">
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', '_s' ); ?></p>
<?php get_search_form(); ?>
<p><?php printf( __( 'Ready to publish your first post? <a href="%1$s">Get started here</a>.', '_s' ), admin_url( 'post-new.php' ) ); ?></p>
</div><!-- .entry-content -->
</article><!-- #post-0 -->

Expand Down

0 comments on commit e932aaa

Please sign in to comment.