Initial commit
Version 0.4; not ready for submission
This commit is contained in:
parent
b3228a6b20
commit
c9facfa199
53
404.php
Normal file
53
404.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/**
|
||||
* The main template file.
|
||||
*
|
||||
* This is the most generic template file in a WordPress theme
|
||||
* and one of the two required files for a theme (the other being style.css).
|
||||
* It is used to display a page when nothing more specific matches a query.
|
||||
* E.g., it puts together the home page when no home.php file exists.
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<!-- Post title info -->
|
||||
<div class="post" >
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<?php _e( '404: We can\'t find that page', 'atticus-finch' ); ?>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
<p><img src='<?php echo get_template_directory_uri(); ?>/images/404.jpg' /></p>
|
||||
<p>
|
||||
<?php
|
||||
_e( 'Sorry, that page or post doesn\'t appear to be here. It may have been deleted, moved, or at the other end of an outdated link.', 'atticus-finch' );
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
_e( 'You can use the menus, categories, or tags to find what you are looking for. You can also use the search form below.', 'atticus-finch' );
|
||||
?>
|
||||
</p>
|
||||
<p id="404search">
|
||||
<?php
|
||||
get_search_form();
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div><!-- end "post" -->
|
||||
|
||||
</div> <!-- end Content -->
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php get_footer(); ?>
|
47
archive.php
Normal file
47
archive.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
/**
|
||||
* The archive template file.
|
||||
*
|
||||
* Displays generic archives.
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div id="archive-title">
|
||||
<?php if ( is_day() ) : ?>
|
||||
<?php printf( __( 'Daily Archive for %s', 'atticus-finch' ), '<span>' . get_the_date() . '</span>' ); ?>
|
||||
<?php elseif ( is_month() ) : ?>
|
||||
<?php printf( __( 'Monthly Archive for %s', 'atticus-finch' ),
|
||||
/* translators: F will be replaced with month, and Y will be replaced with year, so "F Y" in English would be replaced with something like "June 2008". */
|
||||
'<span>' . get_the_date( __( 'F Y', 'atticus-finch' ) ) . '</span>' ); ?>
|
||||
<?php elseif ( is_year() ) : ?>
|
||||
<?php printf(__( 'Yearly Archive for %s', 'atticus-finch' ), '<span>' . get_the_date( 'Y' ) . '</span>' ); ?>
|
||||
<?php else : ?>
|
||||
<?php _e( 'Blog Archive', 'atticus-finch' ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Start the loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'formats/excerpt', get_post_format() ); ?>
|
||||
|
||||
<!-- End the loop -->
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php atticus_finch_display_nav(); ?>
|
||||
</div> <!-- end Content -->
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php get_footer(); ?>
|
44
category.php
Normal file
44
category.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
/**
|
||||
* The category template file.
|
||||
*
|
||||
* Displays category archives.
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div id="archive-title">
|
||||
<h2>
|
||||
<?php
|
||||
printf( __( 'Posts contained in the “<span>%s</span>” category:', 'atticus-finch' ), single_cat_title( '', false ) );
|
||||
?>
|
||||
</h2>
|
||||
<?php
|
||||
echo category_description();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Start the loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'formats/excerpt', get_post_format() ); ?>
|
||||
|
||||
<!-- End the loop -->
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php atticus_finch_display_nav(); ?>
|
||||
</div> <!-- end Content -->
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php get_footer(); ?>
|
75
comments.php
Normal file
75
comments.php
Normal file
@ -0,0 +1,75 @@
|
||||
<div id="comments">
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<?php do_action( 'atticus_finch_before_comments' ); ?>
|
||||
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<p class="nocomments">This post is password protected. Enter the password to view comments.</p>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<!-- Actual comments are listed here -->
|
||||
<h3 class="comments-title">
|
||||
<?php
|
||||
$post_comments = count( get_comments(array('type' => 'comment','post_id' => $post->ID)) );
|
||||
printf( _nx( 'One comment on “%2$s”', '%1$s comments on “%2$s”', $post_comments, 'comments title', 'atticus-finch' ),
|
||||
number_format_i18n( $post_comments ), '<span>' . get_the_title() . '</span>' );
|
||||
?>
|
||||
</h3>
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'div',
|
||||
'short_ping' => false,
|
||||
'avatar_size' => 32,
|
||||
'type' => 'comment',
|
||||
'format' => 'xhtml',
|
||||
) );
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<!-- Pingbacks and trackbacks are listed here -->
|
||||
<h3 class="comments-title">
|
||||
<?php
|
||||
$post_pings = count( get_comments(array( 'type' => 'pings', 'post_id' => $post->ID )) );
|
||||
if ( $post_pings > 0 ) {
|
||||
printf( _nx( 'One pingback/trackback on “%2$s”', '%1$s pingbacks/trackbacks on “%2$s”', $post_pings, 'pingbacks title', 'atticus-finch' ),
|
||||
number_format_i18n( $post_pings ), '<span>' . get_the_title() . '</span>' );
|
||||
}
|
||||
?>
|
||||
</h3>
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'div',
|
||||
'short_ping' => true,
|
||||
'avatar_size' => 0,
|
||||
'type' => 'pings',
|
||||
'format' => 'xhtml',
|
||||
) );
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php
|
||||
// Are there comments to navigate through?
|
||||
if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
|
||||
?>
|
||||
<nav class="navigation comment-navigation" role="navigation">
|
||||
<h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'atticus-finch' ); ?></h1>
|
||||
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'atticus-finch' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'atticus-finch' ) ); ?></div>
|
||||
</nav><!-- .comment-navigation -->
|
||||
<?php endif; // Check for comment navigation ?>
|
||||
|
||||
<?php if ( ! comments_open() && get_comments_number() ) : ?>
|
||||
<p class="no-comments"><?php _e( 'Sorry, but comments are closed.' , 'atticus-finch' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_after_comments' ); ?>
|
||||
<?php endif; // have_comments() ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_comment_form' ) ?>
|
||||
<?php comment_form(); ?>
|
||||
<?php do_action( 'atticus_finch_after_comment_form' ) ?>
|
||||
</div>
|
80
comments__.php
Normal file
80
comments__.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying comments.
|
||||
*
|
||||
* The area of the page that contains both current comments
|
||||
* and the comment form.
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
/*
|
||||
* If the current post is protected by a password and
|
||||
* the visitor has not yet entered the password we will
|
||||
* return early without loading the comments.
|
||||
*/
|
||||
if ( post_password_required() ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="comments" class="comments-area">
|
||||
|
||||
<?php // You can start editing here -- including this comment! ?>
|
||||
|
||||
<?php if ( have_comments() ) : ?>
|
||||
<h2 class="comments-title">
|
||||
<?php
|
||||
printf( // WPCS: XSS OK.
|
||||
esc_html( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', 'atticus-finch' ) ),
|
||||
number_format_i18n( get_comments_number() ),
|
||||
'<span>' . get_the_title() . '</span>'
|
||||
);
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
|
||||
<nav id="comment-nav-above" class="navigation comment-navigation" role="navigation">
|
||||
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'atticus-finch' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
|
||||
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'atticus-finch' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'atticus-finch' ) ); ?></div>
|
||||
|
||||
</div><!-- .nav-links -->
|
||||
</nav><!-- #comment-nav-above -->
|
||||
<?php endif; // Check for comment navigation. ?>
|
||||
|
||||
<ol class="comment-list">
|
||||
<?php
|
||||
wp_list_comments( array(
|
||||
'style' => 'ol',
|
||||
'short_ping' => true,
|
||||
) );
|
||||
?>
|
||||
</ol><!-- .comment-list -->
|
||||
|
||||
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
|
||||
<nav id="comment-nav-below" class="navigation comment-navigation" role="navigation">
|
||||
<h2 class="screen-reader-text"><?php esc_html_e( 'Comment navigation', 'atticus-finch' ); ?></h2>
|
||||
<div class="nav-links">
|
||||
|
||||
<div class="nav-previous"><?php previous_comments_link( esc_html__( 'Older Comments', 'atticus-finch' ) ); ?></div>
|
||||
<div class="nav-next"><?php next_comments_link( esc_html__( 'Newer Comments', 'atticus-finch' ) ); ?></div>
|
||||
|
||||
</div><!-- .nav-links -->
|
||||
</nav><!-- #comment-nav-below -->
|
||||
<?php endif; // Check for comment navigation. ?>
|
||||
|
||||
<?php endif; // Check for have_comments(). ?>
|
||||
|
||||
<?php
|
||||
// If comments are closed and there are comments, let's leave a little note, shall we?
|
||||
if ( ! comments_open() && '0' != get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
|
||||
?>
|
||||
<p class="no-comments"><?php esc_html_e( 'Comments are closed.', 'atticus-finch' ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php comment_form(); ?>
|
||||
|
||||
</div><!-- #comments -->
|
51
footer.php
Normal file
51
footer.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying the footer.
|
||||
*
|
||||
* Contains all content after #container div.
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
?>
|
||||
|
||||
<?php do_action( 'atticus_finch_container_bottom' ); ?>
|
||||
|
||||
</div><!-- end #container -->
|
||||
|
||||
<footer>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_footer_menu' ); ?>
|
||||
|
||||
<nav id="footer-menu">
|
||||
<?php wp_nav_menu( array(
|
||||
'theme_location' => 'footer-menu',
|
||||
'fallback_cb' => '',
|
||||
'menu_class' => '',
|
||||
'menu_id' => 'footermenu',
|
||||
'container' => 'false',
|
||||
'depth' => 4
|
||||
) );
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
</nav>
|
||||
|
||||
<?php do_action( 'atticus_finch_footer_top' ); ?>
|
||||
|
||||
<?php
|
||||
atticus_finch_display_footer_copyright();
|
||||
atticus_finch_display_footer_credits();
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'atticus_finch_footer_bottom' ); ?>
|
||||
|
||||
</footer>
|
||||
|
||||
<?php do_action( 'atticus_finch_after_footer' ); ?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
20
formats/content-aside.php
Normal file
20
formats/content-aside.php
Normal file
@ -0,0 +1,20 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_aside_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-asterisk"></span>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php } else { ?>
|
||||
<h2 class="notitle-h2"><span class="fa fa-asterisk notitle"></span></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'excerpt' ); ?>
|
19
formats/content-audio.php
Normal file
19
formats/content-audio.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-headphones"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</h2>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'main' ); ?>
|
19
formats/content-chat.php
Normal file
19
formats/content-chat.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-comments-o"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</h2>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'main' ); ?>
|
19
formats/content-gallery.php
Normal file
19
formats/content-gallery.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-th"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</h2>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'main' ); ?>
|
19
formats/content-image.php
Normal file
19
formats/content-image.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-image"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</h2>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'main' ); ?>
|
20
formats/content-link.php
Normal file
20
formats/content-link.php
Normal file
@ -0,0 +1,20 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_link_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-link fa-rotate-90"></span>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php } else { ?>
|
||||
<h2 class="notitle-h2"><span class="fa fa-link fa-rotate-90 notitle"></span><div class="clear"></div></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'excerpt' ); ?>
|
21
formats/content-quote.php
Normal file
21
formats/content-quote.php
Normal file
@ -0,0 +1,21 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_quote_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-quote-left"></span>
|
||||
<?php the_title(); ?>
|
||||
<span class="fa fa-quote-right"></span>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php } else { ?>
|
||||
<h2><span class="fa fa-quote-left notitle"></span></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'main' ); ?>
|
20
formats/content-status.php
Normal file
20
formats/content-status.php
Normal file
@ -0,0 +1,20 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_status_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-at"></span>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<?php } else { ?>
|
||||
<h2 class="notitle-h2"><span class="fa fa-at notitle"></span></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'excerpt' ); ?>
|
19
formats/content-video.php
Normal file
19
formats/content-video.php
Normal file
@ -0,0 +1,19 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-video-camera"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</h2>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'main' ); ?>
|
20
formats/content.php
Normal file
20
formats/content.php
Normal file
@ -0,0 +1,20 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<!-- closing tag in content-main.php -->
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-pencil"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</h2>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'main' ); ?>
|
42
formats/excerpt-aside.php
Normal file
42
formats/excerpt-aside.php
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_aside_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-asterisk"></span>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="post-content">
|
||||
<h2><a href="<?php echo get_permalink(); ?>"><span class="fa fa-asterisk notitle"></span></a></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'atticus_finch_aside_excerpt' ) == '1' ) {
|
||||
the_excerpt();
|
||||
} else {
|
||||
the_content();
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'short-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
36
formats/excerpt-audio.php
Normal file
36
formats/excerpt-audio.php
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-headphones"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php the_excerpt(); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'entry-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
36
formats/excerpt-chat.php
Normal file
36
formats/excerpt-chat.php
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-comments-o"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php the_excerpt(); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'entry-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
36
formats/excerpt-gallery.php
Normal file
36
formats/excerpt-gallery.php
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-th"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php the_excerpt(); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'entry-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
36
formats/excerpt-image.php
Normal file
36
formats/excerpt-image.php
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-image"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php the_excerpt(); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'entry-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
42
formats/excerpt-link.php
Normal file
42
formats/excerpt-link.php
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_link_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-link fa-rotate-90"></span>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="post-content">
|
||||
<h2><a href="<?php echo get_permalink(); ?>"><span class="fa fa-link fa-rotate-90 notitle"></span></a></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'atticus_finch_link_excerpt' ) == '1' ) {
|
||||
the_excerpt();
|
||||
} else {
|
||||
the_content();
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'short-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
43
formats/excerpt-quote.php
Normal file
43
formats/excerpt-quote.php
Normal file
@ -0,0 +1,43 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_quote_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-quote-left"></span>
|
||||
<?php the_title(); ?>
|
||||
<span class="fa fa-quote-right"></span>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="post-content post-content-quote">
|
||||
<h2><a href="<?php echo get_permalink(); ?>"><span class="fa fa-quote-left notitle"></span></a></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'atticus_finch_quote_excerpt' ) == '1' ) {
|
||||
the_excerpt();
|
||||
} else {
|
||||
the_content();
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'short-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
42
formats/excerpt-status.php
Normal file
42
formats/excerpt-status.php
Normal file
@ -0,0 +1,42 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php if ( get_theme_mod( 'atticus_finch_status_title') == '1' ) { ?>
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<span class="fa fa-at"></span>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="post-content">
|
||||
<h2><a href="<?php echo get_permalink(); ?>"><span class="fa fa-at notitle"></span></a></h2>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( get_theme_mod( 'atticus_finch_status_excerpt' ) == '1' ) {
|
||||
the_excerpt();
|
||||
} else {
|
||||
the_content();
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'short-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
36
formats/excerpt-video.php
Normal file
36
formats/excerpt-video.php
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-video-camera"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php the_excerpt(); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'entry-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
36
formats/excerpt.php
Normal file
36
formats/excerpt.php
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Post title info -->
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<h2 id="post-<?php the_ID(); ?>" class="post-title">
|
||||
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
|
||||
<?php
|
||||
if ( post_password_required() ) {
|
||||
echo '<span class="fa fa-key fa-rotate-90"></span>';
|
||||
} else {
|
||||
echo '<span class="fa fa-pencil"></span>';
|
||||
}
|
||||
?>
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h2>
|
||||
|
||||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
|
||||
<?php
|
||||
if ( has_post_thumbnail() ) {
|
||||
the_post_thumbnail( 'thumbnail' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php the_excerpt(); ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php get_template_part( 'inc/excerpt', 'entry-meta' ); ?>
|
||||
|
||||
</div><!-- end "Entry" -->
|
184
functions.php
Normal file
184
functions.php
Normal file
@ -0,0 +1,184 @@
|
||||
<?php
|
||||
/**
|
||||
* Atticus Finch functions and definitions
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'atticus_finch_setup' ) ) :
|
||||
/**
|
||||
* Sets up theme defaults and registers support for various WordPress features.
|
||||
*
|
||||
* Note that this function is hooked into the after_setup_theme hook, which
|
||||
* runs before the init hook. The init hook is too late for some features, such
|
||||
* as indicating support for post thumbnails.
|
||||
*/
|
||||
function atticus_finch_setup() {
|
||||
/*
|
||||
* Make theme available for translation.
|
||||
* Translations can be filed in the /languages/ directory.
|
||||
* If you're building a theme based on Atticus Finch, use a find and replace
|
||||
* to change 'atticus-finch' to the name of your theme in all the template files
|
||||
*/
|
||||
load_theme_textdomain( 'atticus-finch', get_template_directory() . '/lang' );
|
||||
|
||||
// Add default posts and comments RSS feed links to head.
|
||||
add_theme_support( 'automatic-feed-links' );
|
||||
|
||||
/*
|
||||
* Let WordPress manage the document title.
|
||||
* By adding theme support, we declare that this theme does not use a
|
||||
* hard-coded <title> tag in the document head, and expect WordPress to
|
||||
* provide it for us.
|
||||
*/
|
||||
add_theme_support( 'title-tag' );
|
||||
|
||||
/*
|
||||
* Enable support for Post Thumbnails on posts and pages.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Function_Reference/add_theme_support#Post_Thumbnails
|
||||
*/
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
|
||||
// This theme uses wp_nav_menu() in three locations.
|
||||
register_nav_menus( array(
|
||||
'top-menu' => esc_html__( 'Top Menu', 'atticus-finch' ),
|
||||
'primary-menu' => esc_html__( 'Primary Menu', 'atticus-finch' ),
|
||||
'footer-menu' => esc_html__( 'Footer Menu', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
/*
|
||||
* Switch default core markup for search form, comment form, and comments
|
||||
* to output valid HTML5.
|
||||
*/
|
||||
add_theme_support( 'html5', array(
|
||||
'search-form',
|
||||
'comment-form',
|
||||
'comment-list',
|
||||
'gallery',
|
||||
'caption',
|
||||
) );
|
||||
|
||||
/*
|
||||
* Enable support for Post Formats.
|
||||
* See http://codex.wordpress.org/Post_Formats
|
||||
*/
|
||||
add_theme_support( 'post-formats', array(
|
||||
'aside',
|
||||
'audio',
|
||||
'chat',
|
||||
'gallery',
|
||||
'image',
|
||||
'link',
|
||||
'quote',
|
||||
'status',
|
||||
'video',
|
||||
) );
|
||||
|
||||
// Set up the WordPress core custom background feature.
|
||||
add_theme_support( 'custom-background', apply_filters( 'atticus_finch_custom_background_args', array(
|
||||
'default-color' => 'ffffff',
|
||||
'default-image' => '',
|
||||
) ) );
|
||||
}
|
||||
endif; // atticus_finch_setup
|
||||
add_action( 'after_setup_theme', 'atticus_finch_setup' );
|
||||
|
||||
/**
|
||||
* Set the content width in pixels, based on the theme's design and stylesheet.
|
||||
*
|
||||
* Priority 0 to make it available to lower priority callbacks.
|
||||
*
|
||||
* @global int $content_width
|
||||
*/
|
||||
function atticus_finch_content_width() {
|
||||
$GLOBALS['content_width'] = apply_filters( 'atticus_finch_content_width', 620 );
|
||||
}
|
||||
add_action( 'after_setup_theme', 'atticus_finch_content_width', 0 );
|
||||
|
||||
/**
|
||||
* Register widget area.
|
||||
*
|
||||
* @link http://codex.wordpress.org/Function_Reference/register_sidebar
|
||||
*/
|
||||
function atticus_finch_widgets_init() {
|
||||
register_sidebar( array(
|
||||
'name' => esc_html__( 'Sidebar', 'atticus-finch' ),
|
||||
'id' => 'sidebar-1',
|
||||
'description' => '',
|
||||
'before_widget' => '',
|
||||
'after_widget' => '',
|
||||
'before_title' => '<h2 class="widget-title">',
|
||||
'after_title' => '</h2>',
|
||||
) );
|
||||
}
|
||||
add_action( 'widgets_init', 'atticus_finch_widgets_init' );
|
||||
|
||||
/**
|
||||
* Enqueue scripts and styles.
|
||||
*/
|
||||
function atticus_finch_scripts() {
|
||||
wp_enqueue_style( 'atticus-finch-style', get_stylesheet_uri(), array (), '0.3', 'screen' );
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-googlefont', 'http://fonts.googleapis.com/css?family=IM+Fell+English:400,400italic', 'atticus-finch-style', '0.4', 'all' );
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-fa', 'http://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', 'atticus-finch-style', '0.4', 'all' );
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-mobile', get_stylesheet_directory_uri() . '/styles/mobile.css', 'atticus-finch-style', '0.4', 'handheld' );
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-print', get_stylesheet_directory_uri() . '/styles/print.css', 'atticus-finch-style', '0.4', 'print' );
|
||||
|
||||
wp_enqueue_style( 'atticus-finch-menu-style', get_template_directory_uri() . '/styles/superfish.css', 'atticus-finch-style', '0.4', 'screen' );
|
||||
|
||||
wp_enqueue_script( 'atticus-finch-navigation', get_template_directory_uri() . '/js/superfish.js', array(), '0.4', true );
|
||||
|
||||
wp_enqueue_script( 'atticus-finch-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '0.4', true );
|
||||
|
||||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
|
||||
wp_enqueue_script( 'comment-reply' );
|
||||
}
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'atticus_finch_scripts' );
|
||||
|
||||
/**
|
||||
* Enable live changes in the customizer
|
||||
*/
|
||||
function atticus_finch_customizer_script() {
|
||||
wp_enqueue_script( 'atticus-finch-theme-customizer', get_template_directory_uri() . '/js/customizer.js', array(), '0.4', true );
|
||||
}
|
||||
add_action( 'customize_preview_init', 'atticus_finch_customizer_script' );
|
||||
|
||||
|
||||
// Change "read more" link on excerpts
|
||||
// codex.wordpress.org/Function_Reference/the_excerpt
|
||||
function atticus_finch_excerpt_more( $more ) {
|
||||
$text = get_theme_mod( 'atticus_finch_readmore', '…read more…' );
|
||||
return ' <a class="excerpt-link" href="' . get_permalink( get_the_ID() ) . '">' . $text . '</a>';
|
||||
}
|
||||
add_filter( 'excerpt_more', 'atticus_finch_excerpt_more' );
|
||||
|
||||
|
||||
/**
|
||||
* Implement the Custom Header feature.
|
||||
*/
|
||||
require get_template_directory() . '/functions/custom-header.php';
|
||||
|
||||
/**
|
||||
* Custom template tags for this theme.
|
||||
*/
|
||||
require get_template_directory() . '/functions/template-tags.php';
|
||||
|
||||
/**
|
||||
* Customizer additions.
|
||||
*/
|
||||
require get_template_directory() . '/functions/customizer.php';
|
||||
|
||||
/**
|
||||
* Load Jetpack compatibility file.
|
||||
*/
|
||||
require get_template_directory() . '/functions/jetpack.php';
|
||||
|
||||
/**
|
||||
* Add our widget areas.
|
||||
*/
|
||||
require get_template_directory() . '/functions/widget-areas.php';
|
126
functions/custom-header.php
Normal file
126
functions/custom-header.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/**
|
||||
* Sample implementation of the Custom Header feature
|
||||
* http://codex.wordpress.org/Custom_Headers
|
||||
*
|
||||
* You can add an optional custom header image to header.php like so ...
|
||||
*
|
||||
<?php if ( get_header_image() ) : ?>
|
||||
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
|
||||
<img src="<?php header_image(); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="">
|
||||
</a>
|
||||
<?php endif; // End header image check. ?>
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
/**
|
||||
* Set up the WordPress core custom header feature.
|
||||
*
|
||||
* @uses atticus_finch_header_style()
|
||||
* @uses atticus_finch_admin_header_style()
|
||||
* @uses atticus_finch_admin_header_image()
|
||||
*/
|
||||
function atticus_finch_custom_header_setup() {
|
||||
add_theme_support( 'custom-header', apply_filters( 'atticus_finch_custom_header_args', array(
|
||||
'default-image' => '',
|
||||
'default-text-color' => '000000',
|
||||
'width' => 1000,
|
||||
'height' => 250,
|
||||
'flex-height' => true,
|
||||
'wp-head-callback' => 'atticus_finch_header_style',
|
||||
'admin-head-callback' => 'atticus_finch_admin_header_style',
|
||||
'admin-preview-callback' => 'atticus_finch_admin_header_image',
|
||||
) ) );
|
||||
}
|
||||
add_action( 'after_setup_theme', 'atticus_finch_custom_header_setup' );
|
||||
|
||||
if ( ! function_exists( 'atticus_finch_header_style' ) ) :
|
||||
/**
|
||||
* Styles the header image and text displayed on the blog
|
||||
*
|
||||
* @see atticus_finch_custom_header_setup().
|
||||
*/
|
||||
function atticus_finch_header_style() {
|
||||
$header_text_color = get_header_textcolor();
|
||||
|
||||
// If no custom options for text are set, let's bail
|
||||
// get_header_textcolor() options: HEADER_TEXTCOLOR is default, hide text (returns 'blank') or any hex value.
|
||||
if ( HEADER_TEXTCOLOR == $header_text_color ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If we get this far, we have custom styles. Let's do this.
|
||||
?>
|
||||
<style type="text/css">
|
||||
<?php
|
||||
// Has the text been hidden?
|
||||
if ( 'blank' == $header_text_color ) :
|
||||
?>
|
||||
.site-title,
|
||||
.site-description {
|
||||
position: absolute;
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
}
|
||||
<?php
|
||||
// If the user has set a custom color for the text use that.
|
||||
else :
|
||||
?>
|
||||
.site-title a,
|
||||
.site-description {
|
||||
color: #<?php echo esc_attr( $header_text_color ); ?>;
|
||||
}
|
||||
<?php endif; ?>
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
endif; // atticus_finch_header_style
|
||||
|
||||
if ( ! function_exists( 'atticus_finch_admin_header_style' ) ) :
|
||||
/**
|
||||
* Styles the header image displayed on the Appearance > Header admin panel.
|
||||
*
|
||||
* @see atticus_finch_custom_header_setup().
|
||||
*/
|
||||
function atticus_finch_admin_header_style() {
|
||||
?>
|
||||
<style type="text/css">
|
||||
.appearance_page_custom-header #headimg {
|
||||
border: none;
|
||||
}
|
||||
#headimg h1,
|
||||
#desc {
|
||||
}
|
||||
#headimg h1 {
|
||||
}
|
||||
#headimg h1 a {
|
||||
}
|
||||
#desc {
|
||||
}
|
||||
#headimg img {
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
}
|
||||
endif; // atticus_finch_admin_header_style
|
||||
|
||||
if ( ! function_exists( 'atticus_finch_admin_header_image' ) ) :
|
||||
/**
|
||||
* Custom header image markup displayed on the Appearance > Header admin panel.
|
||||
*
|
||||
* @see atticus_finch_custom_header_setup().
|
||||
*/
|
||||
function atticus_finch_admin_header_image() {
|
||||
?>
|
||||
<div id="headimg">
|
||||
<h1 class="displaying-header-text">
|
||||
<a id="name" style="<?php echo esc_attr( 'color: #' . get_header_textcolor() ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a>
|
||||
</h1>
|
||||
<div class="displaying-header-text" id="desc" style="<?php echo esc_attr( 'color: #' . get_header_textcolor() ); ?>"><?php bloginfo( 'description' ); ?></div>
|
||||
<?php if ( get_header_image() ) : ?>
|
||||
<img src="<?php header_image(); ?>" alt="">
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
endif; // atticus_finch_admin_header_image
|
767
functions/customizer.php
Normal file
767
functions/customizer.php
Normal file
@ -0,0 +1,767 @@
|
||||
<?php
|
||||
/**
|
||||
* Atticus Finch Theme Customizer
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
function atticus_finch_customize_preview_js() {
|
||||
wp_enqueue_script( 'atticus_finch_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true );
|
||||
}
|
||||
add_action( 'customize_preview_init', 'atticus_finch_customize_preview_js' );
|
||||
|
||||
|
||||
// Add some Customizer stuff
|
||||
// developer.wordpress.org/themes/advanced-topics/customizer-api/
|
||||
add_action( 'customize_register', 'atticus_finch_customize_register', 11 );
|
||||
function atticus_finch_customize_register( $wp_customize ) {
|
||||
|
||||
// Add postMessage support for site title and description for the Theme Customizer
|
||||
$wp_customize->get_setting( 'blogname' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage';
|
||||
$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
|
||||
|
||||
|
||||
$wp_customize->add_panel( 'atticusfinch', array(
|
||||
'title' => __( 'Atticus Finch Theme Options', 'atticus-finch' ),
|
||||
'description' => __( 'The Atticus Finch theme has many options. Vist the theme\'s <a href="http://www.example.com/">home page</a> for complete instructions.', 'atticus-finch' ),
|
||||
'priority' => 05,
|
||||
) );
|
||||
|
||||
|
||||
// Widget Areas
|
||||
$wp_customize->add_section( 'atticus_finch_widget_areas', array(
|
||||
'title' => __( 'Widget Areas', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 30,
|
||||
'description' => __( 'Select which action hook widget areas you would like to activate.', 'atticus-finch' ),
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_header', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_header', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Header', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_after_top_menu', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_after_top_menu', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'After Top Menu', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_social_media', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_social_media', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Social Media', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_primary_menu', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_primary_menu', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Primary Menu', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_after_header', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_after_header', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'After Header', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_container_top', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_container_top', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Top of Container', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_post_title', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_post_title', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Post Title', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
/*
|
||||
* We've removed this action hook, but let's leave this control in place
|
||||
* in case we find a use for it later.
|
||||
$wp_customize->add_setting( 'atticus_finch_before_post_content', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_post_content', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Post Content', 'atticus-finch' ),
|
||||
) );
|
||||
*/
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_post_top', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_post_top', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Top of Post', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_post_bottom', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_post_bottom', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Bottom of Post', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_after_post_content', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_after_post_content', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'After Post Content', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_post_meta', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_post_meta', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Post Meta', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_after_post_meta', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_after_post_meta', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'After Post Meta', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_comments', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_comments', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Comments', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_after_comments', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_after_comments', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'After Comments', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_comment_form', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_comment_form', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Comment Form', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_after_comment_form', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_after_comment_form', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'After Comment Form', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_container_bottom', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_container_bottom', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Bottom of Container', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_before_footer_menu', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_before_footer_menu', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Footer Menu', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_footer_top', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_footer_top', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Top of Footer', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_footer_bottom', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_footer_bottom', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Bottom of Footer', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_after_footer', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_after_footer', array(
|
||||
'section' => 'atticus_finch_widget_areas',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Before Footer', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
// Post Format Title Options
|
||||
$wp_customize->add_section( 'atticus_finch_post_format_title_options', array(
|
||||
'title' => __( 'Post Format Title Options', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 10,
|
||||
'description' => __('Select whether titles should appear for various post formats.', 'atticus-finch'),
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_aside_title', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_aside_title', array(
|
||||
'section' => 'atticus_finch_post_format_title_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display title for asides', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_link_title', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_link_title', array(
|
||||
'section' => 'atticus_finch_post_format_title_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display title for links', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_quote_title', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_quote_title', array(
|
||||
'section' => 'atticus_finch_post_format_title_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display title for quotes', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_status_title', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_status_title', array(
|
||||
'section' => 'atticus_finch_post_format_title_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display title for statuses', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
// Post Format Excerpt Options
|
||||
$wp_customize->add_section( 'atticus_finch_post_format_excerpt_options', array(
|
||||
'title' => __( 'Post Format Excerpt Options', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 20,
|
||||
'description' => __('By default, the aside, link, quote, and statu post format will display full content on the home page. You can choose to show excerpts instead.', 'atticus-finch'),
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_aside_excerpt', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_aside_excerpt', array(
|
||||
'section' => 'atticus_finch_post_format_excerpt_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display excerpt for asides', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_link_excerpt', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_link_excerpt', array(
|
||||
'section' => 'atticus_finch_post_format_excerpt_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display excerpt for links', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_quote_excerpt', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_quote_excerpt', array(
|
||||
'section' => 'atticus_finch_post_format_excerpt_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display excerpt for quotes', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_status_excerpt', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_status_excerpt', array(
|
||||
'section' => 'atticus_finch_post_format_excerpt_options',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display excerpt for statuses', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$default_readmore = __( '…read more…', 'atticus-finch' );
|
||||
$wp_customize->add_setting( 'atticus_finch_readmore', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'default' => $default_readmore,
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_text',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_readmore', array(
|
||||
'section' => 'atticus_finch_post_format_excerpt_options',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Text for ‘read more’ link (in all excerpts)', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
// Copyright Information
|
||||
$wp_customize->add_section( 'atticus_finch_copyright', array(
|
||||
'title' => __( 'Copyright Information', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 50,
|
||||
'description' => __( 'Copyright information will appear in the footer, and at the bottom of printed pages. (Make sure you have not disabled this function under "Miscellaneous Options")', 'atticus-finch' ),
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_copyright', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$default_copyright = '<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" id="cc-button" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.';
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_copyright', array(
|
||||
'section' => 'atticus_finch_copyright',
|
||||
'default' => $default_copyright,
|
||||
'type' => 'textarea',
|
||||
'label' => __( 'Enter your copyright information. (HTML is allowed.)', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
// Custom CSS Information
|
||||
$wp_customize->add_section( 'atticus_finch_custom_css', array(
|
||||
'title' => __( 'Custom CSS', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 60,
|
||||
'description' => __( 'Custom CSS is appended to the <head> of your document. If you need to enter more than a few lines, use a child theme.', 'atticus-finch' ),
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_ccss', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_css',
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_ccss', array(
|
||||
'section' => 'atticus_finch_custom_css',
|
||||
'default' => '',
|
||||
'type' => 'textarea',
|
||||
'label' => __( 'Enter custom CSS here', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
// Print Options
|
||||
$wp_customize->add_section( 'atticus_finch_print', array (
|
||||
'title' => __( 'Print Options', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 40,
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_print_url', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_print_url', array(
|
||||
'section' => 'atticus_finch_print',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Print URL information at end of post', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_print_copyright', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_print_copyright', array(
|
||||
'section' => 'atticus_finch_print',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Print copyright information at end of post', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
// Social Media Options
|
||||
$wp_customize->add_section( 'atticus_finch_social_media', array(
|
||||
'title' => __( 'Social Media Options', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 90,
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_rss', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanintize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_rss', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display link to RSS feed', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_twitter2', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_twitter2', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Enter second Twitter URL', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_twitter', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_twitter', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Enter Twitter URL', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_facebook', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_facebook', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Enter Facebook URL', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_instagram', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_instagram', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Enter Instagram URL', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_youtube', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_youtube', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Enter YouTube URL', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_pinterest', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_pinterest', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Enter Pinterest Profile URL', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_amazon', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'sanitize' => 'html',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_amazon', array(
|
||||
'section' => 'atticus_finch_social_media',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Enter Amazon Wish List URL', 'atticus-finch'),
|
||||
) );
|
||||
|
||||
|
||||
// Miscellaneous Options
|
||||
$wp_customize->add_section( 'atticus_finch_misc', array(
|
||||
'title' => __( 'Miscellaneous Options', 'atticus-finch' ),
|
||||
'capability' => 'edit_theme_options',
|
||||
'priority' => 100,
|
||||
'panel' => 'atticusfinch',
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_display_copyright', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'default' => '1',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_display_copyright', array(
|
||||
'section' => 'atticus_finch_misc',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display copyright information in footer', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_display_credits', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'default' => '1',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_display_credits', array(
|
||||
'section' => 'atticus_finch_misc',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display developer credits in footer', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_edit_post_link', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'default' => '1',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_checkbox',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_edit_post_link', array(
|
||||
'section' => 'atticus_finch_misc',
|
||||
'type' => 'checkbox',
|
||||
'label' => __( 'Display "Edit this post" link if user is logged in', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
$wp_customize->add_setting( 'atticus_finch_excerpt_length', array(
|
||||
'type' => 'theme_mod',
|
||||
'transport' => 'postMessage',
|
||||
'default' => '20',
|
||||
'sanitize_callback' => 'atticus_finch_sanitize_excerpt',
|
||||
) );
|
||||
|
||||
$wp_customize->add_control( 'atticus_finch_excerpt_length', array(
|
||||
'section' => 'atticus_finch_misc',
|
||||
'type' => 'text',
|
||||
'label' => __( 'Excerpt length in number of words (maximum = 100)', 'atticus-finch' ),
|
||||
) );
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Sanitizer Functions
|
||||
|
||||
function atticus_finch_sanitize_checkbox( $input ) {
|
||||
if ( $input == 1 ) {
|
||||
return 1;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function atticus_finch_sanitize_text( $input ) {
|
||||
return wp_kses_post( force_balance_tags( $input ) );
|
||||
}
|
||||
|
||||
function atticus_finch_sanitize_excerpt( $input ) {
|
||||
$input = absint( $input );
|
||||
if ( $input > 100 ) { $input = 100; }
|
||||
return $input;
|
||||
}
|
||||
|
||||
function atticus_finch_sanitize_html( $input ) {
|
||||
wp_kses($input,
|
||||
array(),
|
||||
array(
|
||||
'http' => array(),
|
||||
'https' => array(),
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
function atticus_finch_sanitize_css( $input ) {
|
||||
wp_filter_nohtml_kses( $input );
|
||||
}
|
30
functions/jetpack.php
Normal file
30
functions/jetpack.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* Jetpack Compatibility File
|
||||
* See: https://jetpack.me/
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
/**
|
||||
* Add theme support for Infinite Scroll.
|
||||
* See: https://jetpack.me/support/infinite-scroll/
|
||||
*/
|
||||
function atticus_finch_jetpack_setup() {
|
||||
add_theme_support( 'infinite-scroll', array(
|
||||
'container' => 'main',
|
||||
'render' => 'atticus_finch_infinite_scroll_render',
|
||||
'footer' => 'page',
|
||||
) );
|
||||
} // end function atticus_finch_jetpack_setup
|
||||
add_action( 'after_setup_theme', 'atticus_finch_jetpack_setup' );
|
||||
|
||||
/**
|
||||
* Custom render function for Infinite Scroll.
|
||||
*/
|
||||
function atticus_finch_infinite_scroll_render() {
|
||||
while ( have_posts() ) {
|
||||
the_post();
|
||||
get_template_part( 'template-parts/content', get_post_format() );
|
||||
}
|
||||
} // end function atticus_finch_infinite_scroll_render
|
316
functions/template-tags.php
Normal file
316
functions/template-tags.php
Normal file
@ -0,0 +1,316 @@
|
||||
<?php
|
||||
/**
|
||||
* Custom template tags for this theme.
|
||||
*
|
||||
* Eventually, some of the functionality here could be replaced by core features.
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
|
||||
if ( ! function_exists( 'atticus_finch_posted_on' ) ) :
|
||||
/**
|
||||
* Prints HTML with meta information for the current post-date/time and author.
|
||||
*/
|
||||
function atticus_finch_posted_on() {
|
||||
|
||||
$date = get_the_date();
|
||||
$modd = get_the_modified_date();
|
||||
|
||||
if ( $modd == $date ) {
|
||||
printf(__( '<time class="entry-date published updated" datetime="%s">', 'atticus-finch' ), esc_attr( get_the_date( 'c' ) ) );
|
||||
echo '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">';
|
||||
printf(__( 'Posted on %s', 'atticus-finch' ), get_the_date() );
|
||||
$date;
|
||||
echo '</a></time>';
|
||||
} else {
|
||||
printf(__( '<time class="entry-date published updated" datetime="%s">', 'atticus-finch' ), esc_attr( get_the_date( 'c' ) ) );
|
||||
echo '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">';
|
||||
printf(__( 'Posted on %s', 'atticus-finch' ), get_the_date() );
|
||||
$date;
|
||||
echo '</a>; ';
|
||||
printf(__( '<time class="updated" datetime="%s">', 'atticus-finch') , esc_attr( get_the_modified_date( 'c' ) ) );
|
||||
printf(__( 'modified on %s', 'atticus-finch' ), get_the_modified_date() );
|
||||
echo '</time> ';
|
||||
|
||||
}
|
||||
|
||||
$byline = sprintf(
|
||||
esc_html_x( 'by %s', 'post author', 'atticus-finch' ),
|
||||
'<span class="author vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) . '</a></span>'
|
||||
);
|
||||
|
||||
echo '<span class="byline"> ' . $byline . '</span>'; // WPCS: XSS OK.
|
||||
}
|
||||
endif;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if a blog has more than 1 category.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function atticus_finch_categorized_blog() {
|
||||
if ( false === ( $all_the_cool_cats = get_transient( 'atticus_finch_categories' ) ) ) {
|
||||
// Create an array of all the categories that are attached to posts.
|
||||
$all_the_cool_cats = get_categories( array(
|
||||
'fields' => 'ids',
|
||||
'hide_empty' => 1,
|
||||
|
||||
// We only need to know if there is more than one category.
|
||||
'number' => 2,
|
||||
) );
|
||||
|
||||
// Count the number of categories that are attached to the posts.
|
||||
$all_the_cool_cats = count( $all_the_cool_cats );
|
||||
|
||||
set_transient( 'atticus_finch_categories', $all_the_cool_cats );
|
||||
}
|
||||
|
||||
if ( $all_the_cool_cats > 1 ) {
|
||||
// This blog has more than 1 category so atticus_finch_categorized_blog should return true.
|
||||
return true;
|
||||
} else {
|
||||
// This blog has only 1 category so atticus_finch_categorized_blog should return false.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush out the transients used in atticus_finch_categorized_blog.
|
||||
*/
|
||||
function atticus_finch_category_transient_flusher() {
|
||||
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
|
||||
return;
|
||||
}
|
||||
// Like, beat it. Dig?
|
||||
delete_transient( 'atticus_finch_categories' );
|
||||
}
|
||||
add_action( 'edit_category', 'atticus_finch_category_transient_flusher' );
|
||||
add_action( 'save_post', 'atticus_finch_category_transient_flusher' );
|
||||
|
||||
|
||||
/* My Stuff */
|
||||
|
||||
|
||||
// Determine whether or not to show page navigation at bottom of index/archive
|
||||
// Necessary because page navigation is in a styled <div> and should not appear
|
||||
// on non-paginated pages
|
||||
function atticus_finch_display_nav() {
|
||||
$atticus_finch_num_posts = wp_count_posts()->publish;
|
||||
$atticus_finch_posts_per_page = get_option('posts_per_page ');
|
||||
if ( $atticus_finch_num_posts > $atticus_finch_posts_per_page) {
|
||||
echo '<div id="posts-nav">' . get_posts_nav_link(' • ','« Newer Posts','Older Posts;') . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Determine whether to display the comments box
|
||||
function atticus_finch_comment_display() {
|
||||
$var = get_comments_number();
|
||||
if ( comments_open() || $var > 0 ) {
|
||||
comments_template();
|
||||
} else { echo '
|
||||
<div id="comments">
|
||||
<div id="respond">
|
||||
<p>' . __( 'Sorry, but comments are closed.', 'atticus-finch' ) . '</p>
|
||||
</div>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Display the time
|
||||
// Included here if we need to change it later
|
||||
function atticus_finch_date() {
|
||||
return get_the_time(get_option('date_format'));
|
||||
}
|
||||
|
||||
|
||||
// Display publication info as a translatable string in 'content-entry-meta.php'
|
||||
function atticus_finch_pub() {
|
||||
$atticus_finch_author_link = get_author_posts_url( get_the_author_meta( 'ID' ) );
|
||||
$atticus_finch_author_href = '<a href="' . $atticus_finch_author_link . '">' . get_the_author() . '</a>';
|
||||
echo '<a href="' . get_permalink() . '">';
|
||||
printf( __( 'Published on: %1$s by %2$s', 'atticus-finch' ), atticus_finch_date(), $atticus_finch_author_href );
|
||||
echo '</a>';
|
||||
}
|
||||
|
||||
|
||||
// Display category info as a translatable string in 'content-entry-meta.php'
|
||||
function atticus_finch_cat() {
|
||||
$gbcat = get_the_category_list( ', ' );
|
||||
printf( __( 'Categorized under: %s', 'atticus-finch'), $gbcat );
|
||||
}
|
||||
|
||||
|
||||
// Display tags info as a translatable string in 'content-entry-meta.php'
|
||||
function atticus_finch_tags() {
|
||||
$tags_array = has_tag();
|
||||
if (!empty($tags_array)) {
|
||||
printf( __( 'Tagged with: %s', 'atticus-finch'), get_the_tag_list('', ', ', '' ) );
|
||||
} else {
|
||||
_e( 'This post has no tags.', 'atticus-finch' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Display next post link only if a newer post exists
|
||||
function atticus_finch_next_post_link() {
|
||||
$atticus_finch_npl = get_next_post_link();
|
||||
if ( empty ( $atticus_finch_npl ) ) {
|
||||
echo '<p>' . __( 'You are reading the newest post.', 'atticus-finch' ) . '</p>';
|
||||
} else {
|
||||
echo '<p>' . __( 'Read a newer post:', 'atticus-finch' ) . '</p>';
|
||||
next_post_link();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Display previous post link only if an older post exists
|
||||
function atticus_finch_prev_post_link() {
|
||||
$atticus_finch_ppl = get_previous_post_link();
|
||||
if ( empty ( $atticus_finch_ppl ) ) {
|
||||
echo '<p>>' . __( 'You are reading the oldest post.', 'atticus-finch' ) . '</p>';
|
||||
} else {
|
||||
echo '<p>' . __( 'Read an older post:', 'atticus-finch' ) . '</p>';
|
||||
previous_post_link();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Add the URL information when printing
|
||||
function atticus_finch_print_url() {
|
||||
echo '<p class="printonly printurl">';
|
||||
printf(__( 'Link for this article:', 'atticus-finch' ) );
|
||||
echo '<br /><span class="printurl-url">' . get_the_permalink() . '<span></p>';
|
||||
}
|
||||
|
||||
|
||||
// Add a "Read More" box on excerpts
|
||||
function atticus_finch_read_more() {
|
||||
echo '<p class="read-more"><a href="' . get_the_permalink() . '">';
|
||||
printf(__( 'Read the complete article…', 'atticus-finch' ) );
|
||||
echo '</a></p>';
|
||||
}
|
||||
|
||||
|
||||
// Take care of wp_link_pages
|
||||
function atticus_finch_link_pages() {
|
||||
$defaults = array(
|
||||
'before' => '<div id="link-pages">' . __( 'This post has multiple pages:', 'atticus-finch' ),
|
||||
'after' => '</div>',
|
||||
'link_before' => '',
|
||||
'link_after' => '',
|
||||
'next_or_number' => 'number',
|
||||
'separator' => ' ',
|
||||
'nextpagelink' => __( 'Next page', 'atticus-finch' ),
|
||||
'previouspagelink' => __( 'Previous page', 'atticus-finch' ),
|
||||
'pagelink' => '%',
|
||||
'echo' => 1
|
||||
);
|
||||
wp_link_pages( $defaults );
|
||||
}
|
||||
|
||||
|
||||
// Print options
|
||||
function atticus_finch_print_options() {
|
||||
if ( get_theme_mod( 'atticus_finch_print_copyright' ) == '1' ) {
|
||||
echo '<span class="printonly printcopyright">' .
|
||||
get_theme_mod( 'atticus_finch_copyright', '<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" id="cc-button" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.' ) .
|
||||
'</span>';
|
||||
}
|
||||
if ( get_theme_mod( 'atticus_finch_print_url' ) == '1' ) {
|
||||
echo '<span class="printonly printurl">';
|
||||
printf(__( 'Permalink for this article:', 'atticus-finch' ) );
|
||||
echo '<br /><span class="printurl-url">' . get_the_permalink() . '<span></span>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Edit post link, if user is logged in
|
||||
function atticus_finch_edit_post() {
|
||||
if ( get_theme_mod( 'atticus_finch_edit_post_link' ) == '1' && is_user_logged_in() ) : {
|
||||
edit_post_link('Edit this post', '<p class="edit-post">', '</p>');
|
||||
}
|
||||
endif;
|
||||
}
|
||||
|
||||
|
||||
// Footer options
|
||||
function atticus_finch_display_footer_copyright() {
|
||||
if ( get_theme_mod( 'atticus_finch_display_copyright' ) == '1' ) : {
|
||||
echo '<div id="copyright">' .
|
||||
get_theme_mod( 'atticus_finch_copyright', '<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" id="cc-button" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a>This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.' ) .
|
||||
'</div>';
|
||||
}
|
||||
endif;
|
||||
}
|
||||
|
||||
function atticus_finch_display_footer_credits() {
|
||||
if ( get_theme_mod( 'atticus_finch_display_credits') == '1' ) : {
|
||||
$afwp = '<a href="http://wordpress.org/">WordPress</a>';
|
||||
$afaf = '<a href="http://d12webdesign.com/">Atticus Finch Theme</a>';
|
||||
echo '<div id="credits">';
|
||||
printf(__( 'Powered by %1$s and the %2$s.', 'atticus-finch' ), $afwp, $afaf );
|
||||
echo '</div>';
|
||||
}
|
||||
endif;
|
||||
}
|
||||
|
||||
|
||||
// Custom CSS Option
|
||||
function atticus_finch_custom_css_head() {
|
||||
$afcss = get_theme_mod( 'atticus_finch_custom_css' );
|
||||
// if ( !empty( $afcss ) ) {
|
||||
echo '<style type="text/css">/* Atticus Finch Custom CSS */' . $afcss . '</style>';
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
// Social Media
|
||||
function atticus_finch_social_media_display() {
|
||||
if ( get_theme_mod( 'atticus_finch_rss' ) == '1' ) {
|
||||
echo '<a href="' . site_url() . '/feed" class="sm-rss"><span class="fa fa-rss-square"></span></a>';
|
||||
}
|
||||
|
||||
$aftw = get_theme_mod( 'atticus_finch_twitter' );
|
||||
if ( !empty( $aftw ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'atticus_finch_twitter' ) . '" target="_blank" class="sm-twitter"><span class="fa fa-twitter-square"></span></a>';
|
||||
}
|
||||
|
||||
$aft2 = get_theme_mod( 'atticus_finch_twitter2' );
|
||||
if ( !empty( $aft2 ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'atticus_finch_twitter2' ) . '" target="_blank" class="sm-twitter"><span class="fa fa-twitter-square"></span></a>';
|
||||
}
|
||||
|
||||
$affb = get_theme_mod( 'atticus_finch_facebook' );
|
||||
if ( !empty( $affb ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'atticus_finch_facebook' ) . '" target="_blank" class="sm-facebook"><span class="fa fa-facebook-square"></span></a>';
|
||||
}
|
||||
|
||||
$afig = get_theme_mod( 'atticus_finch_instagram' );
|
||||
if ( !empty( $afig ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'atticus_finch_instagram' ) . '" target="_blank" class="sm-instagram"><span class="fa fa-instagram"></span></a>';
|
||||
}
|
||||
|
||||
$afyt = get_theme_mod( 'atticus_finch_youtube' );
|
||||
if ( !empty( $afyt ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'atticus_finch_youtube' ) . '" target="_blank" class="sm-youtube"><span class="fa fa-youtube-square"></span></a>';
|
||||
}
|
||||
|
||||
$afyt = get_theme_mod( 'atticus_finch_pinterest' );
|
||||
if ( !empty( $afyt ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'atticus_finch_pinterest' ) . '" target="_blank" class="sm-pinterest"><span class="fa fa-pinterest-square"></span></a>';
|
||||
}
|
||||
|
||||
$afam = get_theme_mod( 'atticus_finch_amazon' );
|
||||
if ( !empty( $afam ) ) {
|
||||
echo '<a href="' . get_theme_mod( 'atticus_finch_amazon' ) . '" target="_blank" class="sm-amazon"><span class="fa fa-amazon"></span></a>';
|
||||
}
|
||||
|
||||
}
|
||||
|
544
functions/widget-areas.php
Normal file
544
functions/widget-areas.php
Normal file
@ -0,0 +1,544 @@
|
||||
<?php
|
||||
|
||||
// Our action hook widget areas -- only display them if active
|
||||
|
||||
// header.php action hooks
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_header') == '1' ) :
|
||||
add_action('atticus_finch_before_header', 'atticus_finch_before_header_fc' );
|
||||
function atticus_finch_before_header_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_header' ) ) {
|
||||
echo '<div id="atticus_finch_before_header" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_header' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_top_menu') == '1' ) :
|
||||
add_action('atticus_finch_after_top_menu', 'atticus_finch_after_top_menu_FC' );
|
||||
function atticus_finch_after_top_menu_FC(){
|
||||
if ( is_active_sidebar( 'atticus_finch_after_top_menu' ) ) {
|
||||
echo '<div id="atticus_finch_after_top_menu" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_after_top_menu' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_social_media') == '1' ) :
|
||||
add_action('atticus_finch_before_social_media', 'atticus_finch_before_social_media_fc' );
|
||||
function atticus_finch_before_social_media_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_social_media' ) ) {
|
||||
echo '<div id="atticus_finch_before_social_media" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_social_media' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_primary_menu') == '1' ) :
|
||||
add_action('atticus_finch_before_primary_menu', 'atticus_finch_before_primary_menu_fc' );
|
||||
function atticus_finch_before_primary_menu_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_primary_menu' ) ) {
|
||||
echo '<div id="atticus_finch_before_primary_menu" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_primary_menu' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_header') == '1' ) :
|
||||
add_action('atticus_finch_after_header', 'atticus_finch_after_header_fc' );
|
||||
function atticus_finch_after_header_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_after_header' ) ) {
|
||||
echo '<div id="atticus_finch_after_header" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_after_header' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
// index.php action hooks
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_container_top') == '1' ) :
|
||||
add_action('atticus_finch_container_top', 'atticus_finch_container_top_fc' );
|
||||
function atticus_finch_container_top_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_container_top' ) ) {
|
||||
echo '<div id="atticus_finch_container_top" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_container_top' );
|
||||
echo '</div><div class="clear"></div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
// content.php action hooks
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_post_title') == '1' ) :
|
||||
add_action('atticus_finch_before_post_title', 'atticus_finch_before_post_title_fc' );
|
||||
function atticus_finch_before_post_title_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_post_title' ) ) {
|
||||
echo '<div id="atticus_finch_before_post_title" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_post_title' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_post_content') == '1' ) :
|
||||
add_action('atticus_finch_before_post_content', 'atticus_finch_before_post_content_fc' );
|
||||
function atticus_finch_before_post_content_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_post_content' ) ) {
|
||||
echo '<div id="atticus_finch_before_post_content" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_post_content' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_post_top') == '1' ) :
|
||||
add_action('atticus_finch_post_top', 'atticus_finch_post_top_fc' );
|
||||
function atticus_finch_post_top_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_post_top' ) ) {
|
||||
echo '<div id="atticus_finch_post_top" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_post_top' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_post_bottom') == '1' ) :
|
||||
add_action('atticus_finch_post_bottom', 'atticus_finch_post_bottom_fc' );
|
||||
function atticus_finch_post_bottom_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_post_bottom' ) ) {
|
||||
echo '<div id="atticus_finch_post_bottom" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_post_bottom' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_post_content') == '1' ) :
|
||||
add_action('atticus_finch_after_post_content', 'atticus_finch_after_post_content_fc' );
|
||||
function atticus_finch_after_post_content_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_after_post_content' ) ) {
|
||||
echo '<div id="atticus_finch_after_post_content" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_after_post_content' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_post_meta') == '1' ) :
|
||||
add_action('atticus_finch_before_post_meta', 'atticus_finch_before_post_meta_fc' );
|
||||
function atticus_finch_before_post_meta_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_post_meta' ) ) {
|
||||
echo '<div id="atticus_finch_before_post_meta" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_post_meta' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_post_meta') == '1' ) :
|
||||
add_action('atticus_finch_after_post_meta', 'atticus_finch_after_post_meta_fc' );
|
||||
function atticus_finch_after_post_meta_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_after_post_meta' ) ) {
|
||||
echo '<div id="atticus_finch_after_post_meta" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_after_post_meta' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
// comments.php action hooks
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_comments') == '1' ) :
|
||||
add_action('atticus_finch_before_comments', 'atticus_finch_before_comments_fc' );
|
||||
function atticus_finch_before_comments_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_comments' ) ) {
|
||||
echo '<div id="atticus_finch_before_comments" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_comments' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_comments') == '1' ) :
|
||||
add_action('atticus_finch_after_comments', 'atticus_finch_after_comments_fc' );
|
||||
function atticus_finch_after_comments_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_after_comments' ) ) {
|
||||
echo '<div id="atticus_finch_after_comments" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_after_comments' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_comment_form') == '1' ) :
|
||||
add_action('atticus_finch_before_comment_form', 'atticus_finch_before_comment_form_fc' );
|
||||
function atticus_finch_before_comment_form_fc(){
|
||||
if ( comments_open() ) : {
|
||||
if ( is_active_sidebar( 'atticus_finch_before_comment_form' ) ) {
|
||||
echo '<div id="atticus_finch_before_comment_form" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_comment_form' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_comment_form') == '1' ) :
|
||||
add_action('atticus_finch_after_comment_form', 'atticus_finch_after_comment_form_fc' );
|
||||
function atticus_finch_after_comment_form_fc(){
|
||||
if (comments_open() ) : {
|
||||
if ( is_active_sidebar( 'atticus_finch_after_comment_form' ) ) {
|
||||
echo '<div id="atticus_finch_after_comment_form" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_after_comment_form' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
}
|
||||
endif;
|
||||
|
||||
// footer.php action hooks
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_container_bottom') == '1' ) :
|
||||
add_action('atticus_finch_container_bottom', 'atticus_finch_container_bottom_fc' );
|
||||
function atticus_finch_container_bottom_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_container_bottom' ) ) {
|
||||
echo '<div class="clear"></div><div id="atticus_finch_container_bottom" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_container_bottom' );
|
||||
echo '</div><div class="clear"></div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_footer_menu') == '1' ) :
|
||||
add_action('atticus_finch_before_footer_menu', 'atticus_finch_before_footer_menu_fc' );
|
||||
function atticus_finch_before_footer_menu_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_before_footer_menu' ) ) {
|
||||
echo '<div id="atticus_finch_before_footer_menu" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_before_footer_menu' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_footer_top') == '1' ) :
|
||||
add_action('atticus_finch_footer_top', 'atticus_finch_footer_top_fc' );
|
||||
function atticus_finch_footer_top_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_footer_top' ) ) {
|
||||
echo '<div id="atticus_finch_footer_top" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_footer_top' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_footer_bottom') == '1' ) :
|
||||
add_action('atticus_finch_footer_bottom', 'atticus_finch_footer_bottom_fc' );
|
||||
function atticus_finch_footer_bottom_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_footer_bottom' ) ) {
|
||||
echo '<div id="atticus_finch_footer_bottom" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_footer_bottom' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_footer') == '1' ) :
|
||||
add_action('atticus_finch_after_footer', 'atticus_finch_after_footer_fc' );
|
||||
function atticus_finch_after_footer_fc(){
|
||||
if ( is_active_sidebar( 'atticus_finch_after_footer' ) ) {
|
||||
echo '<div id="atticus_finch_after_footer" class="atticus-finch-action-hook">';
|
||||
dynamic_sidebar( 'atticus_finch_after_footer' );
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
endif;
|
||||
|
||||
// Register our action hooks as widget areas
|
||||
// codex.wordpress.org/Widgetizing_Themes
|
||||
function greybox_action_hook_widgets() {
|
||||
|
||||
// Header widgets
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_header') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Header',
|
||||
'id' => 'atticus_finch_before_header',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages just above the header and the "above header menu" (if you are using one).', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-header-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_top_menu') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'After Top Menu',
|
||||
'id' => 'atticus_finch_after_top_menu',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages below the top menu and above the site name.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-after-top-menu-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_social_media') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Social Media',
|
||||
'id' => 'atticus_finch_before_social_media',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages to the left of the title and to the right of the social media menu.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-social-media-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_primary_menu') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Primary Menu',
|
||||
'id' => 'atticus_finch_before_primary_menu',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages above the primary menu.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-primary-menu-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_header') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'After Header',
|
||||
'id' => 'atticus_finch_after_header',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages after the header and before the main content and sidebar.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-after-header-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
// Index widgets
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_container_top') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Top of Container',
|
||||
'id' => 'atticus_finch_container_top',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages above the sidebar and content.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-container-top-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
// Content widgets
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_post_title') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Post Title',
|
||||
'id' => 'atticus_finch_before_post_title',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages before the post title.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-post-title-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_post_content') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Post Content',
|
||||
'id' => 'atticus_finch_before_post_content',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages after the title and before the post content.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-post-content-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_post_top') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Top of Post',
|
||||
'id' => 'atticus_finch_post_top',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages at the top of the post.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-post-top-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_post_bottom') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Bottom of Post',
|
||||
'id' => 'atticus_finch_post_bottom',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages at the bottom of the post.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-post-bottom-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_post_content') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'After Post Content',
|
||||
'id' => 'atticus_finch_after_post_content',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages after the post content.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-after-post-content-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_post_meta') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Post Meta',
|
||||
'id' => 'atticus_finch_before_post_meta',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages before the post meta.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-post-meta-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_post_meta') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'After Post Meta',
|
||||
'id' => 'atticus_finch_after_post_meta',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages after the post meta.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-after-post-meta-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
// Comments widgets
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_comments') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Comments',
|
||||
'id' => 'atticus_finch_before_comments',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages before the comments.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-comments-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_comments') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'After Comments',
|
||||
'id' => 'atticus_finch_after_comments',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages after the comments.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-after-comments-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_comment_form') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Comment Form',
|
||||
'id' => 'atticus_finch_before_comment_form',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages before the comment form.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-comment-form-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_comment_form') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'After Comment Form',
|
||||
'id' => 'atticus_finch_after_comment_form',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages after the comment form.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-after-comment-form-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
// Footer widgets
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_container_bottom') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Bottom of Container',
|
||||
'id' => 'atticus_finch_container_bottom',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages before the footer.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-container-bottom-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_before_footer_menu') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Before Footer Menu',
|
||||
'id' => 'atticus_finch_before_footer_menu',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages before the footer menu.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-before-footer-menu-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_footer_top') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Footer Top',
|
||||
'id' => 'atticus_finch_footer_top',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages at the top of the footer.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-footer-top-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_footer_bottom') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'Footer Bottom',
|
||||
'id' => 'atticus_finch_footer_bottom',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages at the bottom of the footer.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-footer-bottom-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
if ( get_theme_mod( 'atticus_finch_after_footer') == '1' ) :
|
||||
register_sidebar( array(
|
||||
'name' => 'After Footer',
|
||||
'id' => 'atticus_finch_after_footer',
|
||||
'description' => __( 'Widgets in this area will be shown on all posts and pages after the footer.', 'atticus-finch' ),
|
||||
'before_widget' => '<div class="atticus-finch-after-footer-widget">',
|
||||
'after_widget' => '</div>',
|
||||
'before_title' => '<h3>',
|
||||
'after_title' => '</h3>',
|
||||
) );
|
||||
endif;
|
||||
|
||||
|
||||
|
||||
} // end function
|
||||
add_action( 'widgets_init', 'greybox_action_hook_widgets' );
|
101
header.php
Normal file
101
header.php
Normal file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
/**
|
||||
* The header for our theme.
|
||||
*
|
||||
* Displays all of the <head> section and everything up till <div id="container">
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html <?php language_attributes(); ?>>
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="profile" href="http://gmpg.org/xfn/11">
|
||||
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
|
||||
|
||||
<?php atticus_finch_custom_css_head(); ?>
|
||||
|
||||
<?php wp_head(); ?>
|
||||
</head>
|
||||
|
||||
<body <?php body_class(); ?>>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_header' ); ?>
|
||||
|
||||
<header>
|
||||
|
||||
<nav id="top-menu">
|
||||
<?php wp_nav_menu( array(
|
||||
'theme_location' => 'top-menu',
|
||||
'fallback_cb' => '',
|
||||
'menu_class' => 'sf-menu',
|
||||
'menu_id' => 'aboveheadermenu',
|
||||
'container' => 'false',
|
||||
'depth' => 1
|
||||
) );
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
</nav>
|
||||
|
||||
<?php do_action( 'atticus_finch_after_top_menu' ); ?>
|
||||
|
||||
<div id="header" style="background-image: url('<?php header_image(); ?>');">
|
||||
|
||||
<div id="site-title">
|
||||
<?php if ( is_front_page() ){
|
||||
echo '<h1>' . get_option( 'blogname' ) . '</h1>';
|
||||
} else { ?>
|
||||
<h2><a href="<?php echo home_url(); ?>"><?php bloginfo( 'name' ); ?></a></h2>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div><!-- end #site-title -->
|
||||
|
||||
<div id="site-desc">
|
||||
<?php
|
||||
if ( is_front_page() ){
|
||||
echo '<h2>' . get_option( 'blogdescription' ) . '</h2>';
|
||||
} else {
|
||||
echo '<h3>' . get_option( 'blogdescription' ) . '</h3>';
|
||||
}
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
</div><!-- end #site-desc -->
|
||||
|
||||
<?php do_action( 'atticus_finch_before_social_media'); ?>
|
||||
|
||||
<div id="social-media-menu" class="social-navigation">
|
||||
<?php atticus_finch_social_media_display(); ?>
|
||||
<div class="clear"></div>
|
||||
</div><!-- end #social-media-menu -->
|
||||
|
||||
</div><!-- end #header -->
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_primary_menu' ); ?>
|
||||
|
||||
<nav id="primary-menu">
|
||||
<?php wp_nav_menu( array(
|
||||
'theme_location' => 'primary-menu',
|
||||
'fallback_cb' => '',
|
||||
'menu_class' => 'sf-menu',
|
||||
'menu_id' => 'belowheadermenu',
|
||||
'container' => 'false',
|
||||
'depth' => 3
|
||||
) );
|
||||
?>
|
||||
<div class="clear"></div>
|
||||
</nav>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
</header>
|
||||
|
||||
<?php do_action( 'atticus_finch_after_header' ); ?>
|
||||
|
||||
<div id="container"><!-- closing tag is in footer.php -->
|
||||
|
||||
<?php do_action( 'atticus_finch_container_top' ); ?>
|
BIN
images/404.jpg
Normal file
BIN
images/404.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
14
inc/content-entry-meta.php
Normal file
14
inc/content-entry-meta.php
Normal file
@ -0,0 +1,14 @@
|
||||
<div class="clear"></div>
|
||||
<div id="post-meta">
|
||||
<?php do_action( 'atticus_finch_before_post_meta' ); ?>
|
||||
<div class="list-pub">
|
||||
<?php atticus_finch_pub(); ?>
|
||||
</div>
|
||||
<div class="list-cat">
|
||||
<?php atticus_finch_cat(); ?>
|
||||
</div>
|
||||
<div class="list-tags">
|
||||
<?php atticus_finch_tags(); ?>
|
||||
</div>
|
||||
<?php do_action( 'atticus_finch_after_post_meta' ); ?>
|
||||
</div>
|
30
inc/content-excerpt.php
Normal file
30
inc/content-excerpt.php
Normal file
@ -0,0 +1,30 @@
|
||||
<!-- Post content -->
|
||||
|
||||
<div class="post-content post-content-<?php echo get_post_format(); ?>">
|
||||
|
||||
<?php do_action( 'atticus_finch_post_top' ); ?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'atticus_finch_post_bottom' ); ?>
|
||||
|
||||
<?php atticus_finch_print_options() ?>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php do_action( 'atticus_finch_after_post_content' ); ?>
|
||||
|
||||
<?php atticus_finch_link_pages(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_meta' ); ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'entry-meta' ); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_after_post_meta' ); ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'post-nav' ); ?>
|
||||
|
||||
<?php atticus_finch_comment_display(); ?>
|
||||
|
||||
</div><!-- end post -->
|
26
inc/content-main.php
Normal file
26
inc/content-main.php
Normal file
@ -0,0 +1,26 @@
|
||||
<!-- Post content -->
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<?php do_action( 'atticus_finch_post_top' ); ?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'atticus_finch_post_bottom' ); ?>
|
||||
|
||||
<?php atticus_finch_print_options() ?>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
<?php atticus_finch_link_pages(); ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'entry-meta' ); ?>
|
||||
|
||||
<?php get_template_part( 'inc/content', 'post-nav' ); ?>
|
||||
|
||||
<?php atticus_finch_comment_display(); ?>
|
||||
|
||||
</div><!-- end post -->
|
||||
|
||||
<?php do_action( 'atticus_finch_after_post_content' ); ?>
|
9
inc/content-post-nav.php
Normal file
9
inc/content-post-nav.php
Normal file
@ -0,0 +1,9 @@
|
||||
<div id="post-series">
|
||||
<div class="post-next">
|
||||
<?php atticus_finch_next_post_link(); ?>
|
||||
</div>
|
||||
<div class="post-prev">
|
||||
<?php atticus_finch_prev_post_link(); ?>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
</div>
|
6
inc/excerpt-entry-meta.php
Normal file
6
inc/excerpt-entry-meta.php
Normal file
@ -0,0 +1,6 @@
|
||||
<div class="entry-meta">
|
||||
<p><?php atticus_finch_pub(); ?></p>
|
||||
<p><?php atticus_finch_cat(); ?></p>
|
||||
<p><?php atticus_finch_tags(); ?></p>
|
||||
<div class="clear"></div>
|
||||
</div>
|
5
inc/excerpt-short-meta.php
Normal file
5
inc/excerpt-short-meta.php
Normal file
@ -0,0 +1,5 @@
|
||||
<div class="aside-meta">
|
||||
<?php
|
||||
printf(__( 'Published on %1$s at %2$s', 'atticus-finch'), atticus_finch_date(), get_the_time() );
|
||||
?>
|
||||
</div>
|
36
inc/page-main.php
Normal file
36
inc/page-main.php
Normal file
@ -0,0 +1,36 @@
|
||||
<!-- Post content -->
|
||||
|
||||
<div class="post-content">
|
||||
|
||||
<?php do_action( 'atticus_finch_post_top' ); ?>
|
||||
|
||||
<?php the_content(); ?>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php do_action( 'atticus_finch_post_bottom' ); ?>
|
||||
|
||||
<div id="page-info">
|
||||
<p>
|
||||
<?php
|
||||
_e( 'Published on: ', 'atticus-finch' );
|
||||
the_date();
|
||||
?>
|
||||
</p>
|
||||
<p>
|
||||
<?php
|
||||
_e( 'Lasted edited on: ', 'atticus-finch' );
|
||||
the_modified_date();
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<?php atticus_finch_print_options() ?>
|
||||
|
||||
</div><!-- end post content -->
|
||||
|
||||
|
||||
<?php atticus_finch_comment_display(); ?>
|
||||
|
||||
|
||||
<?php do_action( 'atticus_finch_after_post_content' ); ?>
|
||||
|
35
index.php
Normal file
35
index.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The main template file.
|
||||
*
|
||||
* This is the most generic template file in a WordPress theme
|
||||
* and one of the two required files for a theme (the other being style.css).
|
||||
* It is used to display a page when nothing more specific matches a query.
|
||||
* E.g., it puts together the home page when no home.php file exists.
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<!-- Start the loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'formats/excerpt', get_post_format() ); ?>
|
||||
|
||||
<!-- End the loop -->
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php atticus_finch_display_nav(); ?>
|
||||
</div> <!-- end Content -->
|
||||
|
||||
<?php get_footer(); ?>
|
44
js/customizer.js
Normal file
44
js/customizer.js
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
* customizer.js
|
||||
*
|
||||
* Theme Customizer enhancements for a better user experience.
|
||||
*
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
|
||||
( function( $ ) {
|
||||
// Site title and description.
|
||||
wp.customize( 'blogname', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-title a' ).text( to );
|
||||
} );
|
||||
} );
|
||||
wp.customize( 'blogdescription', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '.site-description' ).text( to );
|
||||
} );
|
||||
} );
|
||||
// Header text color.
|
||||
wp.customize( 'header_textcolor', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
if ( 'blank' === to ) {
|
||||
$( '.site-title, .site-description' ).css( {
|
||||
'clip': 'rect(1px, 1px, 1px, 1px)',
|
||||
'position': 'absolute'
|
||||
} );
|
||||
} else {
|
||||
$( '.site-title, .site-description' ).css( {
|
||||
'clip': 'auto',
|
||||
'color': to,
|
||||
'position': 'relative'
|
||||
} );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
// Social Media Options
|
||||
wp.customize( 'atticus_finch_twitter', function( value ) {
|
||||
value.bind( function( to ) {
|
||||
$( '#social-media-menu' ).text( to );
|
||||
} );
|
||||
} );
|
||||
} )( jQuery );
|
81
js/navigation.js
Normal file
81
js/navigation.js
Normal file
@ -0,0 +1,81 @@
|
||||
/**
|
||||
* navigation.js
|
||||
*
|
||||
* Handles toggling the navigation menu for small screens and enables tab
|
||||
* support for dropdown menus.
|
||||
*/
|
||||
( function() {
|
||||
var container, button, menu, links, subMenus;
|
||||
|
||||
container = document.getElementById( 'site-navigation' );
|
||||
if ( ! container ) {
|
||||
return;
|
||||
}
|
||||
|
||||
button = container.getElementsByTagName( 'button' )[0];
|
||||
if ( 'undefined' === typeof button ) {
|
||||
return;
|
||||
}
|
||||
|
||||
menu = container.getElementsByTagName( 'ul' )[0];
|
||||
|
||||
// Hide menu toggle button if menu is empty and return early.
|
||||
if ( 'undefined' === typeof menu ) {
|
||||
button.style.display = 'none';
|
||||
return;
|
||||
}
|
||||
|
||||
menu.setAttribute( 'aria-expanded', 'false' );
|
||||
if ( -1 === menu.className.indexOf( 'nav-menu' ) ) {
|
||||
menu.className += ' nav-menu';
|
||||
}
|
||||
|
||||
button.onclick = function() {
|
||||
if ( -1 !== container.className.indexOf( 'toggled' ) ) {
|
||||
container.className = container.className.replace( ' toggled', '' );
|
||||
button.setAttribute( 'aria-expanded', 'false' );
|
||||
menu.setAttribute( 'aria-expanded', 'false' );
|
||||
} else {
|
||||
container.className += ' toggled';
|
||||
button.setAttribute( 'aria-expanded', 'true' );
|
||||
menu.setAttribute( 'aria-expanded', 'true' );
|
||||
}
|
||||
};
|
||||
|
||||
// Get all the link elements within the menu.
|
||||
links = menu.getElementsByTagName( 'a' );
|
||||
subMenus = menu.getElementsByTagName( 'ul' );
|
||||
|
||||
// Set menu items with submenus to aria-haspopup="true".
|
||||
for ( var i = 0, len = subMenus.length; i < len; i++ ) {
|
||||
subMenus[i].parentNode.setAttribute( 'aria-haspopup', 'true' );
|
||||
}
|
||||
|
||||
// Each time a menu link is focused or blurred, toggle focus.
|
||||
for ( i = 0, len = links.length; i < len; i++ ) {
|
||||
links[i].addEventListener( 'focus', toggleFocus, true );
|
||||
links[i].addEventListener( 'blur', toggleFocus, true );
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets or removes .focus class on an element.
|
||||
*/
|
||||
function toggleFocus() {
|
||||
var self = this;
|
||||
|
||||
// Move up through the ancestors of the current link until we hit .nav-menu.
|
||||
while ( -1 === self.className.indexOf( 'nav-menu' ) ) {
|
||||
|
||||
// On li elements toggle the class .focus.
|
||||
if ( 'li' === self.tagName.toLowerCase() ) {
|
||||
if ( -1 !== self.className.indexOf( 'focus' ) ) {
|
||||
self.className = self.className.replace( ' focus', '' );
|
||||
} else {
|
||||
self.className += ' focus';
|
||||
}
|
||||
}
|
||||
|
||||
self = self.parentElement;
|
||||
}
|
||||
}
|
||||
} )();
|
33
js/skip-link-focus-fix.js
Normal file
33
js/skip-link-focus-fix.js
Normal file
@ -0,0 +1,33 @@
|
||||
/**
|
||||
* skip-link-focus-fix.js
|
||||
*
|
||||
* Helps with accessibility for keyboard only users.
|
||||
*
|
||||
* Learn more: https://github.com/Automattic/Atticus Finch/pull/136
|
||||
*/
|
||||
( function() {
|
||||
var is_webkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
|
||||
is_opera = navigator.userAgent.toLowerCase().indexOf( 'opera' ) > -1,
|
||||
is_ie = navigator.userAgent.toLowerCase().indexOf( 'msie' ) > -1;
|
||||
|
||||
if ( ( is_webkit || is_opera || is_ie ) && document.getElementById && window.addEventListener ) {
|
||||
window.addEventListener( 'hashchange', function() {
|
||||
var id = location.hash.substring( 1 ),
|
||||
element;
|
||||
|
||||
if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
element = document.getElementById( id );
|
||||
|
||||
if ( element ) {
|
||||
if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
|
||||
element.tabIndex = -1;
|
||||
}
|
||||
|
||||
element.focus();
|
||||
}
|
||||
}, false );
|
||||
}
|
||||
})();
|
262
js/superfish.js
Normal file
262
js/superfish.js
Normal file
@ -0,0 +1,262 @@
|
||||
/*
|
||||
* jQuery Superfish Menu Plugin
|
||||
* Copyright (c) 2013 Joel Birch
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*/
|
||||
|
||||
(function ($, w) {
|
||||
"use strict";
|
||||
|
||||
var methods = (function () {
|
||||
// private properties and methods go here
|
||||
var c = {
|
||||
bcClass: 'sf-breadcrumb',
|
||||
menuClass: 'sf-js-enabled',
|
||||
anchorClass: 'sf-with-ul',
|
||||
menuArrowClass: 'sf-arrows'
|
||||
},
|
||||
ios = (function () {
|
||||
var ios = /iPhone|iPad|iPod/i.test(navigator.userAgent);
|
||||
if (ios) {
|
||||
// iOS clicks only bubble as far as body children
|
||||
$(w).load(function () {
|
||||
$('body').children().on('click', $.noop);
|
||||
});
|
||||
}
|
||||
return ios;
|
||||
})(),
|
||||
wp7 = (function () {
|
||||
var style = document.documentElement.style;
|
||||
return ('behavior' in style && 'fill' in style && /iemobile/i.test(navigator.userAgent));
|
||||
})(),
|
||||
unprefixedPointerEvents = (function () {
|
||||
return (!!w.PointerEvent);
|
||||
})(),
|
||||
toggleMenuClasses = function ($menu, o) {
|
||||
var classes = c.menuClass;
|
||||
if (o.cssArrows) {
|
||||
classes += ' ' + c.menuArrowClass;
|
||||
}
|
||||
$menu.toggleClass(classes);
|
||||
},
|
||||
setPathToCurrent = function ($menu, o) {
|
||||
return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels)
|
||||
.addClass(o.hoverClass + ' ' + c.bcClass)
|
||||
.filter(function () {
|
||||
return ($(this).children(o.popUpSelector).hide().show().length);
|
||||
}).removeClass(o.pathClass);
|
||||
},
|
||||
toggleAnchorClass = function ($li) {
|
||||
$li.children('a').toggleClass(c.anchorClass);
|
||||
},
|
||||
toggleTouchAction = function ($menu) {
|
||||
var msTouchAction = $menu.css('ms-touch-action');
|
||||
var touchAction = $menu.css('touch-action');
|
||||
touchAction = touchAction || msTouchAction;
|
||||
touchAction = (touchAction === 'pan-y') ? 'auto' : 'pan-y';
|
||||
$menu.css({
|
||||
'ms-touch-action': touchAction,
|
||||
'touch-action': touchAction
|
||||
});
|
||||
},
|
||||
applyHandlers = function ($menu, o) {
|
||||
var targets = 'li:has(' + o.popUpSelector + ')';
|
||||
if ($.fn.hoverIntent && !o.disableHI) {
|
||||
$menu.hoverIntent(over, out, targets);
|
||||
}
|
||||
else {
|
||||
$menu
|
||||
.on('mouseenter.superfish', targets, over)
|
||||
.on('mouseleave.superfish', targets, out);
|
||||
}
|
||||
var touchevent = 'MSPointerDown.superfish';
|
||||
if (unprefixedPointerEvents) {
|
||||
touchevent = 'pointerdown.superfish';
|
||||
}
|
||||
if (!ios) {
|
||||
touchevent += ' touchend.superfish';
|
||||
}
|
||||
if (wp7) {
|
||||
touchevent += ' mousedown.superfish';
|
||||
}
|
||||
$menu
|
||||
.on('focusin.superfish', 'li', over)
|
||||
.on('focusout.superfish', 'li', out)
|
||||
.on(touchevent, 'a', o, touchHandler);
|
||||
},
|
||||
touchHandler = function (e) {
|
||||
var $this = $(this),
|
||||
$ul = $this.siblings(e.data.popUpSelector);
|
||||
|
||||
if ($ul.length > 0 && $ul.is(':hidden')) {
|
||||
$this.one('click.superfish', false);
|
||||
if (e.type === 'MSPointerDown' || e.type === 'pointerdown') {
|
||||
$this.trigger('focus');
|
||||
} else {
|
||||
$.proxy(over, $this.parent('li'))();
|
||||
}
|
||||
}
|
||||
},
|
||||
over = function () {
|
||||
var $this = $(this),
|
||||
o = getOptions($this);
|
||||
clearTimeout(o.sfTimer);
|
||||
$this.siblings().superfish('hide').end().superfish('show');
|
||||
},
|
||||
out = function () {
|
||||
var $this = $(this),
|
||||
o = getOptions($this);
|
||||
if (ios) {
|
||||
$.proxy(close, $this, o)();
|
||||
}
|
||||
else {
|
||||
clearTimeout(o.sfTimer);
|
||||
o.sfTimer = setTimeout($.proxy(close, $this, o), o.delay);
|
||||
}
|
||||
},
|
||||
close = function (o) {
|
||||
o.retainPath = ($.inArray(this[0], o.$path) > -1);
|
||||
this.superfish('hide');
|
||||
|
||||
if (!this.parents('.' + o.hoverClass).length) {
|
||||
o.onIdle.call(getMenu(this));
|
||||
if (o.$path.length) {
|
||||
$.proxy(over, o.$path)();
|
||||
}
|
||||
}
|
||||
},
|
||||
getMenu = function ($el) {
|
||||
return $el.closest('.' + c.menuClass);
|
||||
},
|
||||
getOptions = function ($el) {
|
||||
return getMenu($el).data('sf-options');
|
||||
};
|
||||
|
||||
return {
|
||||
// public methods
|
||||
hide: function (instant) {
|
||||
if (this.length) {
|
||||
var $this = this,
|
||||
o = getOptions($this);
|
||||
if (!o) {
|
||||
return this;
|
||||
}
|
||||
var not = (o.retainPath === true) ? o.$path : '',
|
||||
$ul = $this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector),
|
||||
speed = o.speedOut;
|
||||
|
||||
if (instant) {
|
||||
$ul.show();
|
||||
speed = 0;
|
||||
}
|
||||
o.retainPath = false;
|
||||
o.onBeforeHide.call($ul);
|
||||
$ul.stop(true, true).animate(o.animationOut, speed, function () {
|
||||
var $this = $(this);
|
||||
o.onHide.call($this);
|
||||
});
|
||||
}
|
||||
return this;
|
||||
},
|
||||
show: function () {
|
||||
var o = getOptions(this);
|
||||
if (!o) {
|
||||
return this;
|
||||
}
|
||||
var $this = this.addClass(o.hoverClass),
|
||||
$ul = $this.children(o.popUpSelector);
|
||||
|
||||
o.onBeforeShow.call($ul);
|
||||
$ul.stop(true, true).animate(o.animation, o.speed, function () {
|
||||
o.onShow.call($ul);
|
||||
});
|
||||
return this;
|
||||
},
|
||||
destroy: function () {
|
||||
return this.each(function () {
|
||||
var $this = $(this),
|
||||
o = $this.data('sf-options'),
|
||||
$hasPopUp;
|
||||
if (!o) {
|
||||
return false;
|
||||
}
|
||||
$hasPopUp = $this.find(o.popUpSelector).parent('li');
|
||||
clearTimeout(o.sfTimer);
|
||||
toggleMenuClasses($this, o);
|
||||
toggleAnchorClass($hasPopUp);
|
||||
toggleTouchAction($this);
|
||||
// remove event handlers
|
||||
$this.off('.superfish').off('.hoverIntent');
|
||||
// clear animation's inline display style
|
||||
$hasPopUp.children(o.popUpSelector).attr('style', function (i, style) {
|
||||
return style.replace(/display[^;]+;?/g, '');
|
||||
});
|
||||
// reset 'current' path classes
|
||||
o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass);
|
||||
$this.find('.' + o.hoverClass).removeClass(o.hoverClass);
|
||||
o.onDestroy.call($this);
|
||||
$this.removeData('sf-options');
|
||||
});
|
||||
},
|
||||
init: function (op) {
|
||||
return this.each(function () {
|
||||
var $this = $(this);
|
||||
if ($this.data('sf-options')) {
|
||||
return false;
|
||||
}
|
||||
var o = $.extend({}, $.fn.superfish.defaults, op),
|
||||
$hasPopUp = $this.find(o.popUpSelector).parent('li');
|
||||
o.$path = setPathToCurrent($this, o);
|
||||
|
||||
$this.data('sf-options', o);
|
||||
|
||||
toggleMenuClasses($this, o);
|
||||
toggleAnchorClass($hasPopUp);
|
||||
toggleTouchAction($this);
|
||||
applyHandlers($this, o);
|
||||
|
||||
$hasPopUp.not('.' + c.bcClass).superfish('hide', true);
|
||||
|
||||
o.onInit.call(this);
|
||||
});
|
||||
}
|
||||
};
|
||||
})();
|
||||
|
||||
$.fn.superfish = function (method, args) {
|
||||
if (methods[method]) {
|
||||
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
|
||||
}
|
||||
else if (typeof method === 'object' || ! method) {
|
||||
return methods.init.apply(this, arguments);
|
||||
}
|
||||
else {
|
||||
return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish');
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.superfish.defaults = {
|
||||
popUpSelector: 'ul,.sf-mega', // within menu context
|
||||
hoverClass: 'sfHover',
|
||||
pathClass: 'overrideThisToUse',
|
||||
pathLevels: 1,
|
||||
delay: 800,
|
||||
animation: {opacity: 'show'},
|
||||
animationOut: {opacity: 'hide'},
|
||||
speed: 'normal',
|
||||
speedOut: 'fast',
|
||||
cssArrows: true,
|
||||
disableHI: false,
|
||||
onInit: $.noop,
|
||||
onBeforeShow: $.noop,
|
||||
onShow: $.noop,
|
||||
onBeforeHide: $.noop,
|
||||
onHide: $.noop,
|
||||
onIdle: $.noop,
|
||||
onDestroy: $.noop
|
||||
};
|
||||
|
||||
})(jQuery, window);
|
40
page-no-sidebar.php
Normal file
40
page-no-sidebar.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
/**
|
||||
* <?php
|
||||
*
|
||||
* Template Name: Full Width Page
|
||||
*
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h1 class="post-title">
|
||||
<span class="dashicons dashicons-admin-page"></span>
|
||||
<?php the_title(); ?>
|
||||
</h1>
|
||||
|
||||
<!-- Start the loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'inc/page', 'main' ); ?>
|
||||
|
||||
<!-- End the loop -->
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div> <!-- end Content -->
|
||||
|
||||
<?php get_footer(); ?>
|
48
page.php
Normal file
48
page.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/**
|
||||
* The page template file.
|
||||
*
|
||||
* This is the most generic template file in a WordPress theme
|
||||
* and one of the two required files for a theme (the other being style.css).
|
||||
* It is used to display a page when nothing more specific matches a query.
|
||||
* E.g., it puts together the home page when no home.php file exists.
|
||||
* Learn more: http://codex.wordpress.org/Template_Hierarchy
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
|
||||
<?php atticus_finch_edit_post(); ?>
|
||||
|
||||
<?php do_action( 'atticus_finch_before_post_title' ); ?>
|
||||
|
||||
<h1 class="post-title">
|
||||
<span class="dashicons dashicons-admin-page"></span>
|
||||
<?php the_title(); ?>
|
||||
</h1>
|
||||
|
||||
<!-- Start the loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'inc/page', 'main' ); ?>
|
||||
|
||||
<!-- End the loop -->
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</div><!-- end Post -->
|
||||
|
||||
</div><!-- end Content -->
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php get_footer(); ?>
|
10
readme.txt
Normal file
10
readme.txt
Normal file
@ -0,0 +1,10 @@
|
||||
=== Atticus Finch ===
|
||||
Contributors: kjodle
|
||||
Tags: black, gray, white, fixed-layout, two-columns, left-sidebar, custom-menu, featured-images, post-formats, theme-options, threaded-comments, translation-ready
|
||||
Requires at least: 4.1
|
||||
Tested up to: 4.3
|
||||
Stable tag: 1.0
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
== Description ==
|
BIN
screenshot.png
Normal file
BIN
screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
15
sidebar.php
Normal file
15
sidebar.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
/**
|
||||
* The sidebar containing the main widget area.
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
if ( ! is_active_sidebar( 'sidebar-1' ) ) {
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div id="sidebar" class="widget-area" role="complementary">
|
||||
<?php dynamic_sidebar( 'sidebar-1' ); ?>
|
||||
</div><!-- end #sidebar -->
|
33
single.php
Normal file
33
single.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* The template for displaying all single posts and attachments
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<article>
|
||||
<!-- Start the loop -->
|
||||
<?php if (have_posts()) : ?>
|
||||
<?php while (have_posts()) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'formats/content', get_post_format() ); ?>
|
||||
|
||||
<!-- End the loop -->
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</article>
|
||||
|
||||
</div> <!-- end Content -->
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php get_footer(); ?>
|
800
style.css
Normal file
800
style.css
Normal file
@ -0,0 +1,800 @@
|
||||
/*
|
||||
Theme Name: Atticus Finch
|
||||
Theme URI: http://techblog.kjodle.net/
|
||||
Author: kjodle
|
||||
Author URI: http://d12webdesign.com/
|
||||
Description: Description
|
||||
Version: 0.4
|
||||
License: GNU General Public License v2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
Tags: black, gray, white, fixed-layout, two-columns, left-sidebar, custom-menu, featured-images, post-formats, theme-options, threaded-comments, translation-ready
|
||||
Text Domain: atticus-finch
|
||||
|
||||
This theme, like WordPress, is licensed under the GPL.
|
||||
Use it to make something cool, have fun, and share what you've learned with others.
|
||||
*/
|
||||
|
||||
/**********************************/
|
||||
/*
|
||||
* 1. Simple Resets
|
||||
* 2. Main Containers
|
||||
* 3. Top Elements
|
||||
* 4. #content Elements
|
||||
* 5. .post Elements
|
||||
* 6. Post Formats
|
||||
* 7. Comments
|
||||
* 8. Sidebar Elements
|
||||
* 9. Footer Elements
|
||||
* 10. Special Sections
|
||||
* 11. Archive Pages
|
||||
* 12. Action Hook Widget Areas
|
||||
* 13. Social Media Menu
|
||||
* 14. Required by WordPress
|
||||
* 15. Miscellaneous Fixes
|
||||
*
|
||||
/**********************************/
|
||||
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 1. Simple Resets */
|
||||
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: serif;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 2. Main Containers */
|
||||
|
||||
#container {
|
||||
margin: 0px auto;
|
||||
max-width: 1000px;
|
||||
min-width: 700px;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
border-right: solid 1px #999;
|
||||
float: left;
|
||||
padding-right: 2%;
|
||||
text-align: right;
|
||||
width: 22%;
|
||||
margin-right: -1px;
|
||||
}
|
||||
|
||||
#content {
|
||||
border-left: solid 1px #999;
|
||||
float: left;
|
||||
padding: 0 2%;
|
||||
width: 71%;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.page-template-page-no-sidebar #content {
|
||||
border-left: none;
|
||||
width: 80%;
|
||||
padding: 0;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
float: none;
|
||||
}
|
||||
|
||||
body > footer {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
body > header {
|
||||
border-bottom: solid 1px #444;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
body > footer {
|
||||
border-top: solid 1px #444;
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 3. Top Elements */
|
||||
|
||||
#site-title {
|
||||
position: relative;
|
||||
clear: both;
|
||||
width: 60%;
|
||||
float: left;
|
||||
font-family: "IM Fell English", serif;
|
||||
padding: 24px 0 24px 30px;
|
||||
}
|
||||
|
||||
#site-title h1,
|
||||
#site-title h2 {
|
||||
font-size: 28px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#site-title a {
|
||||
text-decoration: none;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#site-desc {
|
||||
position: relative;
|
||||
width: 20%;
|
||||
float: right;
|
||||
padding: 1.8em 1em 1.8em 1em;
|
||||
font-style: italic;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
#site-desc h2,
|
||||
#site-desc h3 {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
nav#top-menu,
|
||||
nav#primary-menu {
|
||||
background: #fafafa;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
li.menu-item a {
|
||||
color: #444;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.current-menu-item {
|
||||
background: #ddd;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 4. #content Elements */
|
||||
|
||||
#content h2:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 5. .post Elements */
|
||||
|
||||
.home .post,
|
||||
.archive .post {
|
||||
border-top: solid 1px #888;
|
||||
margin-top: 1.2em;
|
||||
padding-top: 1.2em;
|
||||
}
|
||||
.home .post:first-child,
|
||||
.archive .post:first-child {
|
||||
border-top: none;
|
||||
padding-top: 0;
|
||||
margin-top: 0;
|
||||
}
|
||||
.home .post:last-child,
|
||||
.archive .post:last-child {
|
||||
border-bottom: solid 1px #888;
|
||||
}
|
||||
|
||||
.post p {
|
||||
font-size: 16px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.post a {
|
||||
text-decoration: none;
|
||||
border-bottom: dotted 1px #ddd;
|
||||
color: #448;
|
||||
-webkit-transition: border-color 1s;
|
||||
transition: border-color 1s;
|
||||
}
|
||||
.post.sticky a {
|
||||
border-bottom: dotted 1px #efefef;
|
||||
-webkit-transition: border-color 1s;
|
||||
transition: border-color 1s;
|
||||
}
|
||||
.post a:hover {
|
||||
border-color: #444;
|
||||
}
|
||||
|
||||
.post-title {
|
||||
font-size: 24px;
|
||||
font-family: "IM Fell English", serif; */
|
||||
margin: 0;
|
||||
}
|
||||
.post-title a {
|
||||
color: #444;
|
||||
border-bottom: dotted 1px #fff;
|
||||
-webkit-transition: border-color 2s;
|
||||
transition: border-color 2s;
|
||||
}
|
||||
.post-title a:hover {
|
||||
border-color: #444;
|
||||
}
|
||||
|
||||
.tags-links,
|
||||
.cat-links,
|
||||
.edit-link {
|
||||
font-size: 12px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.tags-links a,
|
||||
.cat-links a,
|
||||
.edit-link a {
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.entry-meta {
|
||||
border-top: dotted 1px #ccc;
|
||||
padding-top: 6px;
|
||||
text-align: right;
|
||||
}
|
||||
.entry-meta a {
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
}
|
||||
.entry-meta a:hover {
|
||||
border-bottom: dotted 1px #999;
|
||||
}
|
||||
.entry-meta p {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.edit-post {
|
||||
float: right;
|
||||
clear: both;
|
||||
background: #fff;
|
||||
margin: 0;
|
||||
}
|
||||
.edit-post a {
|
||||
padding: 6px;
|
||||
font-size: 10px;
|
||||
text-decoration: none;
|
||||
color: #555;
|
||||
font-family: monospace;
|
||||
display: block;
|
||||
}
|
||||
.edit-post a:hover {
|
||||
background: #fee;
|
||||
}
|
||||
|
||||
#post-meta {
|
||||
border-top: solid 1px #bbb;
|
||||
padding: 6px 0;
|
||||
margin: 12px 0 0 0;
|
||||
}
|
||||
.list-pub a,
|
||||
.list-cat a,
|
||||
.list-tags a {
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
}
|
||||
.list-pub a:hover,
|
||||
.list-cat a:hover,
|
||||
.list-tags a:hover{
|
||||
border-bottom: dotted 1px #444;
|
||||
}
|
||||
.list-pub,
|
||||
.list-cat,
|
||||
.list-tags {
|
||||
padding: 4px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#post-series {
|
||||
border-top: solid 1px #bbb;
|
||||
border-bottom: solid 1px #bbb;
|
||||
padding: 6px 9px;
|
||||
margin: 0 0 12px 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
#post-series a {
|
||||
text-decoration: none;
|
||||
color: #222;
|
||||
padding: 6px 6px 4px 6px;
|
||||
}
|
||||
#post-series p {
|
||||
margin-bottom: 3px;
|
||||
margin-top: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
.post-prev {
|
||||
float: left;
|
||||
display: inline-block;
|
||||
}
|
||||
.post-next {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
text-align: right;
|
||||
}
|
||||
.post-prev a,
|
||||
.post-next a {
|
||||
transition: background 1s;
|
||||
}
|
||||
.post-prev a:hover,
|
||||
.post-next a:hover {
|
||||
background: #eef;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 6. Post Formats */
|
||||
|
||||
.aside-meta { /* For aside, link, quote, status on front page */
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dashicons,
|
||||
.dashicons-before::before {
|
||||
font-size: 24px;
|
||||
margin-top: 1px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.notitle {
|
||||
font-size: 48px !important; /* Mark as important because of Font Awesome settings */
|
||||
float: left;
|
||||
color: #444;
|
||||
margin-bottom: 0px;
|
||||
padding-right: 14px;
|
||||
}
|
||||
.home .notitle {
|
||||
font-size: 24px !important;
|
||||
}
|
||||
.notitle-h2 {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
a .dashicons-format-aside,
|
||||
a .dashicons-admin-links,
|
||||
a .dashicons-format-quote,
|
||||
a .dashicons-format-status {
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* Chat Posts */
|
||||
.format-chat .post-content p{
|
||||
background: #E9E9E9; /* The background color of first paragraph */
|
||||
border-left: 7px solid #C9C9C9; /* The setting for border of first paragraph */
|
||||
margin-bottom: 2px;
|
||||
padding: 6px 0 6px 13px;
|
||||
}
|
||||
.format-chat .post-content p:nth-child(odd) {
|
||||
background: #F7F7F7; /* The background color of next paragraph */
|
||||
border-left-color: #E0E0E0; /* The setting for border of next paragraph */
|
||||
}
|
||||
|
||||
div.post-content > p { /* Eliminate top margin on aside, link, quote, status if title is not displayed */
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Quote Posts */
|
||||
.format-quote .post-content p {
|
||||
font-weight: bold;
|
||||
font-size: 24px;
|
||||
}
|
||||
.format-quote .post-content p:last-of-type {
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 7. Comments */
|
||||
|
||||
ol.comment-list {
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
div.comment,
|
||||
div.pingback {
|
||||
font-size: 14px;
|
||||
margin: 6px 0px;
|
||||
box-shadow: 2px 2px 2px 0 #eee;
|
||||
color: #222;
|
||||
padding: 0 0 10px 20px;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 8. Sidebar elements */
|
||||
|
||||
#sidebar {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
#sidebar h2 {
|
||||
font-size: 17px;
|
||||
margin-bottom: 0.8em;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
#sidebar h2:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
#sidebar ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#sidebar li {
|
||||
list-style-type: none;
|
||||
padding-top: 3px;
|
||||
font-size: 13px;
|
||||
border-top: solid 1px #ddd;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
#sidebar li:last-child {
|
||||
border-bottom: solid 1px #ddd;
|
||||
}
|
||||
|
||||
#sidebar a {
|
||||
text-decoration: none;
|
||||
color: #444;
|
||||
border-bottom: dotted 1px #fff;
|
||||
transition: border-color 1s;
|
||||
-webkit-transition: border-color 1s;
|
||||
}
|
||||
|
||||
#sidebar a:hover {
|
||||
border-bottom: dotted 1px #222;
|
||||
}
|
||||
|
||||
#sidebar .screen-reader-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#sidebar td,
|
||||
#sidebar table caption,
|
||||
#sidebar thead,
|
||||
#sidebar tfoot {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 9. Footer Elements */
|
||||
|
||||
footer {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
footer a {
|
||||
text-decoration: none;
|
||||
color: #777;
|
||||
border-bottom: dotted 1px #fff;
|
||||
transition: border-color 1s;
|
||||
}
|
||||
footer a:hover {
|
||||
border-color: #444;
|
||||
}
|
||||
|
||||
#copyright,
|
||||
#credits {
|
||||
margin: 10px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
#copyright {
|
||||
float: left;
|
||||
width: 40%;
|
||||
}
|
||||
|
||||
#cc-button {
|
||||
float: left;
|
||||
padding: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
#credits {
|
||||
float: right;
|
||||
text-align: right;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
ul#footermenu {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
ul#footermenu li {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 2px 8px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
ul#footermenu li ul {
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
ul#footermenu li ul li {
|
||||
float: none;
|
||||
font-size: 14px;
|
||||
max-width: 120px;
|
||||
}
|
||||
|
||||
ul#footermenu a {
|
||||
padding: 2px;
|
||||
border: none;
|
||||
color: #444;
|
||||
background: #fff;
|
||||
display: inline-block;
|
||||
transition: background 2s, color 2s;
|
||||
}
|
||||
ul#footermenu a:hover {
|
||||
background: #444;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 10. Special Sections */
|
||||
|
||||
#page-info {
|
||||
border-bottom: solid 1px #fff;
|
||||
padding: 3px 0;
|
||||
transition: border-color 2s;
|
||||
}
|
||||
#page-info:hover {
|
||||
border-color: #ddd;
|
||||
}
|
||||
#page-info p {
|
||||
margin: 0 0 2px;
|
||||
font-size: 13px;
|
||||
font-style: italic;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.printonly {
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 11. Archive Pages */
|
||||
|
||||
#archive-title {
|
||||
border: solid 1px #999;
|
||||
background: #fff;
|
||||
padding: 9px 12px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
color: #555;
|
||||
}
|
||||
#posts-nav {
|
||||
border-top: 1px solid #777;
|
||||
margin: 2em 0.8em 0;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
#posts-nav a {
|
||||
text-decoration: none;
|
||||
color: #222;
|
||||
}
|
||||
#posts-nav a:hover {
|
||||
border-bottom: dotted 1px #444;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 12. Action Hook Widget Areas */
|
||||
|
||||
#atticus_finch_before_social_media,
|
||||
#atticus_finch_after_footer,
|
||||
#atticus_finch_footer_bottom {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/**********************************/
|
||||
/* 13. Social Media Menu */
|
||||
|
||||
#social-media-menu {
|
||||
clear: both;
|
||||
margin-bottom: 6px;
|
||||
padding: 0 0 0 30px;
|
||||
height: 60px;
|
||||
max-height: 48px;
|
||||
}
|
||||
|
||||
#social-media-menu a {
|
||||
font-size: 32px;
|
||||
color: #ddd;
|
||||
padding-right: 6px;
|
||||
vertical-align: text-top;
|
||||
transition: color 2s, font-size 2s;
|
||||
}
|
||||
#social-media-menu a:hover {
|
||||
font-size: 48px;
|
||||
color: #444;
|
||||
}
|
||||
#social-media-menu a.sm-rss:hover {
|
||||
color: #ff8300;
|
||||
}
|
||||
#social-media-menu a.sm-twitter:hover {
|
||||
color: #4F9FDD;
|
||||
}
|
||||
#social-media-menu a.sm-facebook:hover {
|
||||
color: #3A5795;
|
||||
}
|
||||
#social-media-menu a.sm-instagram:hover {
|
||||
color: #9b6954;
|
||||
}
|
||||
#social-media-menu a.sm-youtube:hover {
|
||||
color: #DF2826;
|
||||
}
|
||||
#social-media-menu a.sm-pinterest:hover {
|
||||
color: #C92228;
|
||||
}
|
||||
#social-media-menu a.sm-amazon:hover {
|
||||
color: #F3A847;
|
||||
}
|
||||
|
||||
/**********************************/
|
||||
/* 14. Required by WordPress */
|
||||
|
||||
.size-auto,
|
||||
.size-full,
|
||||
.size-large,
|
||||
.size-medium,
|
||||
.size-thumbnail {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.sticky {
|
||||
background: #efefef;
|
||||
padding: 0.5em;
|
||||
}
|
||||
.sticky:first-child .post-title,
|
||||
.post:first-child .post-title {
|
||||
margin-top: 0;
|
||||
}
|
||||
.post:first-child h2 {
|
||||
padding-top: 0;
|
||||
}
|
||||
.sticky:first-child h2 {
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.wp-caption {
|
||||
border: solid 1px #bbb;
|
||||
padding: 6px;
|
||||
background: #f9f9f9;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.wp-caption-text {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.gallery-caption {
|
||||
|
||||
}
|
||||
|
||||
.bypostauthor {
|
||||
|
||||
}
|
||||
|
||||
.alignright {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.alignleft {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.aligncenter {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.wp-caption a,
|
||||
.wp-caption a:hover {
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.wp-post-image { /* Align images in excerpts */
|
||||
float: left;
|
||||
margin: 0 10px 8px 0;
|
||||
}
|
||||
|
||||
|
||||
/**********************************/
|
||||
/* 15. Miscellaneous Fixes */
|
||||
|
||||
table#wp-calendar {
|
||||
width: 100%;
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
h2 table#wp-calendar {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Development */
|
||||
/* Delete when theme is complete */
|
||||
|
||||
.post-content img { /*For images without a caption */
|
||||
border: solid 1px #ddd;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.wp-caption img { /* For images with a caption */
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.atticus-finch-post-top-widget {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
span.fa .fa-at {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
.format-quote .post-content iframe {
|
||||
clear:both;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
border: solid 1px #ddd;
|
||||
padding: 12px;
|
||||
}
|
||||
blockquote:before {
|
||||
font-family: "FontAwesome";
|
||||
content: '\f10d';
|
||||
color: rgba( 50, 50, 50, 0.1);
|
||||
font-size: 50px;
|
||||
float: left;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
blockquote.PWGP_caption::before {
|
||||
/* border: none; */
|
||||
content: none;
|
||||
}
|
||||
|
||||
blockquote.PWGP_caption {
|
||||
margin: 3px 0;
|
||||
text-align: left;
|
||||
border: none;
|
||||
}
|
25
styles/mobile.css
Normal file
25
styles/mobile.css
Normal file
@ -0,0 +1,25 @@
|
||||
/* Mobile Style Sheet for Atticus Finch Theme */
|
||||
|
||||
@media (max-device-width: 800px) {
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: red;
|
||||
}
|
||||
|
||||
#container {
|
||||
width: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#sidebar {
|
||||
float: none;
|
||||
}
|
||||
|
||||
#sidebar,
|
||||
#content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
}
|
65
styles/print.css
Normal file
65
styles/print.css
Normal file
@ -0,0 +1,65 @@
|
||||
body > header,
|
||||
body > footer,
|
||||
#sidebar,
|
||||
a.post-edit-link,
|
||||
#post-series {
|
||||
display: none;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#container,
|
||||
#content,
|
||||
.post,
|
||||
.page,
|
||||
.post-content {
|
||||
max-width: 100%;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#content {
|
||||
border: none;
|
||||
}
|
||||
|
||||
#content p,
|
||||
#content ol,
|
||||
#content ul,
|
||||
#content li,
|
||||
#content dl,
|
||||
#content dd,
|
||||
#content dt {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
.noprint {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.printonly {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.printcopyright,
|
||||
.printurl {
|
||||
border: solid 1pt #000;
|
||||
font-size: 8pt;
|
||||
padding: 6pt;
|
||||
width: 80%;
|
||||
margin: 6pt auto;
|
||||
}
|
||||
|
||||
.alignright {
|
||||
float: right;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.alignleft {
|
||||
float: left;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.aligncenter {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
118
styles/superfish.css
Normal file
118
styles/superfish.css
Normal file
@ -0,0 +1,118 @@
|
||||
/*** ESSENTIAL STYLES ***/
|
||||
.sf-menu, .sf-menu * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.sf-menu li {
|
||||
position: relative;
|
||||
}
|
||||
.sf-menu ul {
|
||||
position: absolute;
|
||||
display: none;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
z-index: 99;
|
||||
}
|
||||
.sf-menu > li {
|
||||
float: left;
|
||||
}
|
||||
.sf-menu li:hover > ul,
|
||||
.sf-menu li.sfHover > ul {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sf-menu a {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
.sf-menu ul ul {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
|
||||
/*** DEMO SKIN ***/
|
||||
.sf-menu {
|
||||
float: left;
|
||||
/*
|
||||
margin-bottom: 1em;
|
||||
*/
|
||||
}
|
||||
.sf-menu ul {
|
||||
box-shadow: 2px 2px 6px rgba(0,0,0,.2);
|
||||
min-width: 12em; /* allow long menu items to determine submenu width */
|
||||
*width: 12em; /* no auto sub width for IE7, see white-space comment below */
|
||||
}
|
||||
.sf-menu a {
|
||||
border-left: 1px solid #fff;
|
||||
border-top: 1px solid #dFeEFF; /* fallback colour must use full shorthand */
|
||||
border-top: 1px solid rgba(255,255,255,.5);
|
||||
padding: .65em .8em;
|
||||
text-decoration: none;
|
||||
zoom: 1; /* IE7 */
|
||||
}
|
||||
.sf-menu a {
|
||||
color: #339;
|
||||
}
|
||||
.sf-menu li {
|
||||
/*
|
||||
background: #BDD2FF;
|
||||
*/
|
||||
white-space: nowrap; /* no need for Supersubs plugin */
|
||||
*white-space: normal; /* ...unless you support IE7 (let it wrap) */
|
||||
-webkit-transition: background .2s;
|
||||
transition: background .2s;
|
||||
border-right: solid 1px #ccc;
|
||||
}
|
||||
.sf-menu ul li {
|
||||
background: #ddd;
|
||||
}
|
||||
.sf-menu ul ul li {
|
||||
background: #ddd;
|
||||
}
|
||||
.sf-menu li:hover,
|
||||
.sf-menu li.sfHover {
|
||||
background: #eee;
|
||||
/* only transition out, not in */
|
||||
-webkit-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
/*** arrows (for all except IE7) **/
|
||||
.sf-arrows .sf-with-ul {
|
||||
padding-right: 2.5em;
|
||||
*padding-right: 1em; /* no CSS arrows for IE7 (lack pseudo-elements) */
|
||||
}
|
||||
/* styling for both css and generated arrows */
|
||||
.sf-arrows .sf-with-ul:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 1em;
|
||||
margin-top: -3px;
|
||||
height: 0;
|
||||
width: 0;
|
||||
/* order of following 3 rules important for fallbacks to work */
|
||||
border: 5px solid transparent;
|
||||
border-top-color: #dFeEFF; /* edit this to suit design (no rgba in IE8) */
|
||||
border-top-color: rgba(255,255,255,.5);
|
||||
}
|
||||
.sf-arrows > li > .sf-with-ul:focus:after,
|
||||
.sf-arrows > li:hover > .sf-with-ul:after,
|
||||
.sf-arrows > .sfHover > .sf-with-ul:after {
|
||||
border-top-color: white; /* IE8 fallback colour */
|
||||
}
|
||||
/* styling for right-facing arrows */
|
||||
.sf-arrows ul .sf-with-ul:after {
|
||||
margin-top: -5px;
|
||||
margin-right: -3px;
|
||||
border-color: transparent;
|
||||
border-left-color: #dFeEFF; /* edit this to suit design (no rgba in IE8) */
|
||||
border-left-color: rgba(255,255,255,.5);
|
||||
}
|
||||
.sf-arrows ul li > .sf-with-ul:focus:after,
|
||||
.sf-arrows ul li:hover > .sf-with-ul:after,
|
||||
.sf-arrows ul .sfHover > .sf-with-ul:after {
|
||||
border-left-color: white;
|
||||
}
|
43
tag.php
Normal file
43
tag.php
Normal file
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
/**
|
||||
* The tag template file.
|
||||
*
|
||||
* Displays a tag archive
|
||||
*
|
||||
* @package Atticus Finch
|
||||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
?>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
|
||||
<div id="content">
|
||||
|
||||
<div id="archive-title">
|
||||
<h2>
|
||||
<?php
|
||||
printf( __( 'Posts tagged with: <span>%s</span>', 'atticus-finch' ), single_cat_title( '', false ) );
|
||||
?>
|
||||
</h2>
|
||||
<?php
|
||||
$description = tag_description();
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Start the loop -->
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<?php while ( have_posts() ) : the_post(); ?>
|
||||
|
||||
<?php get_template_part( 'formats/excerpt', get_post_format() ); ?>
|
||||
|
||||
<!-- End the loop -->
|
||||
<?php endwhile; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php atticus_finch_display_nav(); ?>
|
||||
</div> <!-- end Content -->
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php get_footer(); ?>
|
Loading…
Reference in New Issue
Block a user