Skip to content

Commit 3d245ef

Browse files
committed
Create copy of sempress for customising
0 parents  commit 3d245ef

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+8531
-0
lines changed

404.php

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?php
2+
/**
3+
* The template for displaying 404 pages (Not Found).
4+
*
5+
* @package SemPress
6+
* @since SemPress 1.0.0
7+
*/
8+
9+
get_header(); ?>
10+
11+
<section id="primary" class="full-width">
12+
<main id="content" role="main">
13+
14+
<article id="post-0" class="post error404 not-found">
15+
<header class="entry-header">
16+
<h1 class="entry-title p-entry-title"><?php _e( 'Well this is somewhat embarrassing, isn&rsquo;t it?', 'sempress' ); ?></h1>
17+
</header>
18+
19+
<div class="entry-content e-entry-content">
20+
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching, or one of the links below, can help.', 'sempress' ); ?></p>
21+
22+
<?php get_search_form(); ?>
23+
24+
<?php the_widget( 'WP_Widget_Recent_Posts' ); ?>
25+
26+
<div class="widget">
27+
<h2 class="widgettitle"><?php _e( 'Most Used Categories', 'sempress' ); ?></h2>
28+
<ul>
29+
<?php wp_list_categories( array( 'orderby' => 'count', 'order' => 'DESC', 'show_count' => 1, 'title_li' => '', 'number' => 10 ) ); ?>
30+
</ul>
31+
</div>
32+
33+
<?php
34+
/* translators: %1$s: smilie */
35+
$archive_content = '<p>' . sprintf( __( 'Try looking in the monthly archives. %1$s', 'sempress' ), convert_smilies( ':)' ) ) . '</p>';
36+
the_widget( 'WP_Widget_Archives', 'dropdown=1', "after_title=</h2>$archive_content" );
37+
?>
38+
39+
<?php the_widget( 'WP_Widget_Tag_Cloud' ); ?>
40+
41+
</div><!-- .entry-content -->
42+
</article><!-- #post-0 -->
43+
44+
</main><!-- #content -->
45+
</section><!-- #primary -->
46+
47+
<?php get_footer(); ?>

archive.php

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
/**
3+
* The template for displaying Archive pages.
4+
*
5+
* Used to display archive-type pages if nothing more specific matches a query.
6+
* For example, puts together date-based pages if no date.php file exists.
7+
*
8+
* Learn more: http://codex.wordpress.org/Template_Hierarchy
9+
*
10+
* @package SemPress
11+
* @since SemPress 1.0.0
12+
*/
13+
14+
get_header(); ?>
15+
16+
<section id="primary">
17+
<main id="content" role="main">
18+
19+
<?php if ( have_posts() ) : ?>
20+
21+
<header class="page-header">
22+
<h1 class="page-title">
23+
<?php
24+
if ( is_date() ) :
25+
$link = '';
26+
if ( is_day() ) {
27+
$link .= ' <a href=" ' . get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) . '">' . get_the_time( 'd' ) . '.</a>';
28+
} if ( is_month() || is_day() ) {
29+
$link .= ' <a href="' . get_month_link( get_the_time( 'Y' ), get_the_time( 'm' ) ) . '">' . get_the_date( 'F' ) . '</a>';
30+
} if ( is_year() || is_month() || is_day() ) {
31+
$link .= ' <a href="' . get_year_link( get_the_time( 'Y' ) ) . '">' . get_the_time( 'Y' ) . '</a>';
32+
}
33+
34+
printf( __( 'Archives: %s', 'sempress' ), '<span itemprop="breadcrumb">' . $link . '</span>' );
35+
elseif ( get_post_format() ) :
36+
printf( __( 'Archives: %s', 'sempress' ), '<span>' . get_post_format_string( get_post_format() ) . '</span>' );
37+
else :
38+
_e( 'Archives', 'sempress' );
39+
endif;
40+
?>
41+
</h1>
42+
</header>
43+
44+
<?php rewind_posts(); ?>
45+
46+
<?php sempress_content_nav( 'nav-above' ); ?>
47+
48+
<?php /* Start the Loop */ ?>
49+
<?php while ( have_posts() ) : the_post(); ?>
50+
51+
<?php
52+
/* Include the Post-Format-specific template for the content.
53+
* If you want to overload this in a child theme then include a file
54+
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
55+
*/
56+
get_template_part( 'content', get_post_format() );
57+
?>
58+
59+
<?php endwhile; ?>
60+
61+
<?php sempress_content_nav( 'nav-below' ); ?>
62+
63+
<?php else : ?>
64+
65+
<article id="post-0" class="post no-results not-found">
66+
<header class="entry-header">
67+
<h1 class="entry-title p-entry-title"><?php _e( 'Nothing Found', 'sempress' ); ?></h1>
68+
</header><!-- .entry-header -->
69+
70+
<div class="entry-content e-entry-content">
71+
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'sempress' ); ?></p>
72+
<?php get_search_form(); ?>
73+
</div><!-- .entry-content -->
74+
</article><!-- #post-0 -->
75+
76+
<?php endif; ?>
77+
78+
</main><!-- #content -->
79+
</section><!-- #primary -->
80+
81+
<?php get_sidebar(); ?>
82+
<?php get_footer(); ?>

author.php

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?php
2+
/**
3+
* The template for displaying Author Archive pages.
4+
*
5+
* @package SemPress
6+
* @since SemPress 1.0.0
7+
*/
8+
9+
get_header(); ?>
10+
11+
<section id="primary">
12+
<main id="content" role="main">
13+
14+
<?php if ( have_posts() ) : ?>
15+
16+
<?php
17+
/* Queue the first post, that way we know
18+
* what author we're dealing with (if that is the case).
19+
*
20+
* We reset this later so we can run the loop
21+
* properly with a call to rewind_posts().
22+
*/
23+
the_post();
24+
?>
25+
26+
<header class="page-header author vcard h-card" itemprop="author" itemscope itemtype="http://schema.org/Person">
27+
<h1 class="page-title"><?php printf( __( 'Author Archives: %s', 'sempress' ), '<a class="url u-url fn p-fn n p-name" href="' . get_author_posts_url( get_the_author_meta( 'ID' ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me author" itemprop="url"><span itemprop="name">' . get_the_author() . '</span></a>' ); ?></h1>
28+
<?php echo get_avatar( get_the_author_meta( 'ID' ), 40 ); ?>
29+
<?php if ( get_the_author_meta( 'description' ) ) { ?>
30+
<div class="author-note note p-note" itemprop="description"><p><?php echo get_the_author_meta( 'description' ); ?></p></div>
31+
<?php } ?>
32+
</header>
33+
34+
<?php
35+
/* Since we called the_post() above, we need to
36+
* rewind the loop back to the beginning that way
37+
* we can run the loop properly, in full.
38+
*/
39+
rewind_posts();
40+
?>
41+
42+
<?php sempress_content_nav( 'nav-above' ); ?>
43+
44+
<?php /* Start the Loop */ ?>
45+
<?php while ( have_posts() ) : the_post(); ?>
46+
47+
<?php
48+
/* Include the Post-Format-specific template for the content.
49+
* If you want to overload this in a child theme then include a file
50+
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
51+
*/
52+
get_template_part( 'content', get_post_format() );
53+
?>
54+
55+
<?php endwhile; ?>
56+
57+
<?php sempress_content_nav( 'nav-below' ); ?>
58+
59+
<?php else : ?>
60+
61+
<article id="post-0" class="post no-results not-found">
62+
<header class="entry-header">
63+
<h1 class="entry-title p-entry-title"><?php _e( 'Nothing Found', 'sempress' ); ?></h1>
64+
</header><!-- .entry-header -->
65+
66+
<div class="entry-content e-entry-content">
67+
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'sempress' ); ?></p>
68+
<?php get_search_form(); ?>
69+
</div><!-- .entry-content -->
70+
</article><!-- #post-0 -->
71+
72+
<?php endif; ?>
73+
74+
</main><!-- #content -->
75+
</section><!-- #primary -->
76+
77+
<?php get_sidebar(); ?>
78+
<?php get_footer(); ?>

category.php

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<?php
2+
/**
3+
* The template for displaying Category Archive pages.
4+
*
5+
* @package SemPress
6+
* @since SemPress 1.0.0
7+
*/
8+
9+
get_header(); ?>
10+
11+
<section id="primary">
12+
<main id="content" role="main">
13+
14+
<?php if ( have_posts() ) : ?>
15+
16+
<header class="page-header">
17+
<h1 class="page-title"><?php
18+
printf( __( 'Category Archives: %s', 'sempress' ), '<span>' . single_cat_title( '', false ) . '</span>' );
19+
?></h1>
20+
21+
<?php
22+
$category_description = category_description();
23+
if ( ! empty( $category_description ) ) {
24+
echo apply_filters( 'category_archive_meta', '<div class="category-archive-meta">' . $category_description . '</div>' );
25+
}
26+
?>
27+
</header>
28+
29+
<?php sempress_content_nav( 'nav-above' ); ?>
30+
31+
<?php /* Start the Loop */ ?>
32+
<?php while ( have_posts() ) : the_post(); ?>
33+
34+
<?php
35+
/* Include the Post-Format-specific template for the content.
36+
* If you want to overload this in a child theme then include a file
37+
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
38+
*/
39+
get_template_part( 'content', get_post_format() );
40+
?>
41+
42+
<?php endwhile; ?>
43+
44+
<?php sempress_content_nav( 'nav-below' ); ?>
45+
46+
<?php else : ?>
47+
48+
<article id="post-0" class="post no-results not-found">
49+
<header class="entry-header">
50+
<h1 class="entry-title p-entry-title"><?php _e( 'Nothing Found', 'sempress' ); ?></h1>
51+
</header><!-- .entry-header -->
52+
53+
<div class="entry-content e-entry-content">
54+
<p><?php _e( 'It seems we can&rsquo;t find what you&rsquo;re looking for. Perhaps searching can help.', 'sempress' ); ?></p>
55+
<?php get_search_form(); ?>
56+
</div><!-- .entry-content -->
57+
</article><!-- #post-0 -->
58+
59+
<?php endif; ?>
60+
61+
</main><!-- #content -->
62+
</section><!-- #primary -->
63+
64+
<?php get_sidebar(); ?>
65+
<?php get_footer(); ?>

comments.php

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?php
2+
/**
3+
* The template for displaying Comments.
4+
*
5+
* The area of the page that contains both current comments
6+
* and the comment form. The actual display of comments is
7+
* handled by a callback to sempress_comment() which is
8+
* located in the functions.php file.
9+
*
10+
* @package SemPress
11+
* @since SemPress 1.0.0
12+
*/
13+
?>
14+
<div id="comments">
15+
<?php if ( post_password_required() ) : ?>
16+
<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'sempress' ); ?></p>
17+
</div><!-- #comments -->
18+
<?php
19+
/* Stop the rest of comments.php from being processed,
20+
* but don't kill the script entirely -- we still have
21+
* to fully load the template.
22+
*/
23+
return;
24+
endif;
25+
?>
26+
27+
<?php // You can start editing here -- including this comment! ?>
28+
29+
<?php if ( have_comments() ) : ?>
30+
<h2 id="comments-title">
31+
<?php
32+
printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'sempress' ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
33+
?>
34+
</h2>
35+
36+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
37+
<nav id="comment-nav-above">
38+
<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'sempress' ); ?></h1>
39+
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'sempress' ) ); ?></div>
40+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'sempress' ) ); ?></div>
41+
</nav>
42+
<?php endif; // check for comment navigation ?>
43+
44+
<ol class="commentlist">
45+
<?php
46+
/* Loop through and list the comments. Tell wp_list_comments()
47+
* to use sempress_comment() to format the comments.
48+
* If you want to overload this in a child theme then you can
49+
* define sempress_comment() and that will be used instead.
50+
* See sempress_comment() in sempress/functions.php for more.
51+
*/
52+
wp_list_comments( array( 'callback' => 'sempress_comment', 'format' => 'html5' ) );
53+
?>
54+
</ol>
55+
56+
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // are there comments to navigate through ?>
57+
<nav id="comment-nav-below">
58+
<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'sempress' ); ?></h1>
59+
<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'sempress' ) ); ?></div>
60+
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments &rarr;', 'sempress' ) ); ?></div>
61+
</nav>
62+
<?php endif; // check for comment navigation ?>
63+
64+
<?php endif; // have_comments() ?>
65+
66+
<?php
67+
// If comments are closed and there are no comments, let's leave a little note, shall we?
68+
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
69+
?>
70+
<p class="nocomments"><?php _e( 'Comments are closed.', 'sempress' ); ?></p>
71+
<?php endif; ?>
72+
73+
<?php comment_form( array( 'format' => 'html5' ) ); ?>
74+
75+
</div><!-- #comments -->

content-aside.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* The template for displaying posts in the Aside Post Format on index and archive pages
4+
*
5+
* Learn more: http://codex.wordpress.org/Post_Formats
6+
*
7+
* @package SemPress
8+
* @since SemPress 1.0.0
9+
*/
10+
?>
11+
12+
<article <?php sempress_post_id(); ?> <?php post_class(); ?><?php sempress_semantics( 'post' ); ?>>
13+
<?php if ( is_search() ) : // Only display Excerpts for search pages ?>
14+
<div class="entry-summary p-summary entry-title p-name" itemprop="name description">
15+
<?php the_excerpt(); ?>
16+
</div><!-- .entry-summary -->
17+
<?php else : ?>
18+
<div class="entry-content e-content p-summary entry-title p-name" itemprop="name headline description articleBody">
19+
<?php sempress_the_post_thumbnail( '<p>', '</p>' ); ?>
20+
<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'sempress' ) ); ?>
21+
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'sempress' ), 'after' => '</div>' ) ); ?>
22+
</div><!-- .entry-content -->
23+
<?php endif; ?>
24+
25+
<?php get_template_part( 'entry', 'footer' ); ?>
26+
</article><!-- #post-<?php the_ID(); ?> -->

0 commit comments

Comments
 (0)