-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 98e51f6
Showing
23 changed files
with
2,689 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Harmony | ||
Harmony is a theme built for readability and ease of customizing. | ||
|
||
- Requires PHP: 7.4 | ||
- Requires CP: 1.4 | ||
- Version: 1.0.1 | ||
- Author: Larry Judd | ||
- Tags: two-columns, translation-ready, featured-images, blog, e-commerce, news, custom-menu, custom-background, custom-logo, custom-header | ||
- License: GPL 3 (see LICENSE) | ||
- Text domain: april | ||
|
||
# Description | ||
Harmony is a blogging theme made for ClassicPress. Features include fast loading templates. Upload Hero Image. Position for Image. Placement of Call to Action buttons. Choose the font family type. Demo at https://leadspilot.com/april-theme | ||
|
||
# Features | ||
Theme Options Include: | ||
|
||
- Upload Hero Image. | ||
- Position for Image. | ||
Position of background image. | ||
- Placement of Call to Action buttons. | ||
- Font for Content | ||
Choose the font family type. | ||
|
||
Theme built with CSS3 grid templating specifications for full mobile and small device support. | ||
|
||
# Support | ||
Use https://github.com/tradesouthwest/harmony/issues to post your issues with this theme. | ||
|
||
<!-- https://medium.com/write-better-wordpress-code/wordpress-plugins-in-theme-integration-done-right-1d0d0613c512 --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
get_header(); ?> | ||
|
||
<section class="single-column"> | ||
|
||
<main id="main" class="main main-content"> | ||
|
||
<?php | ||
if ( have_posts() ) | ||
{ ?><h4> | ||
<?php | ||
|
||
if ( is_category() ) { | ||
$atitle = single_cat_title( '', false ); | ||
} elseif ( is_tag() ) { | ||
$atitle = single_tag_title( '', false ); | ||
} elseif ( is_author() ) { | ||
$atitle = '<span class="vcard">' . get_the_author() . '</span>'; | ||
} elseif ( is_post_type_archive() ) { | ||
$atitle = post_type_archive_title( '', false ); | ||
} elseif ( is_tax() ) { | ||
$atitle = single_term_title( '', false ); | ||
} else { | ||
$atitle = ''; | ||
} | ||
echo esc_html( $atitle ); | ||
?></h4> | ||
<?php | ||
// Start the loop. | ||
while ( have_posts() ) : | ||
the_post(); | ||
|
||
get_template_part( 'parts/excerpt' ); | ||
?> | ||
<?php | ||
// End the loop. | ||
endwhile; | ||
?> | ||
|
||
<div id="postPagination" class="post-navigation"> | ||
<?php | ||
// Previous/next page navigation. | ||
the_posts_pagination( ); | ||
?> | ||
</div> | ||
|
||
<?php | ||
} else { | ||
get_template_part( 'parts/nocontent' ); | ||
} ?> | ||
|
||
</main> | ||
|
||
</section> | ||
|
||
<?php get_footer(); ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* The template part for displaying content | ||
* | ||
* @package ClassicPress | ||
* @subpackage Themename | ||
* @since Themename 1.0.0 | ||
*/ | ||
?> | ||
|
||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | ||
|
||
<header class="content-title"> | ||
<h2><?php the_title(); ?></h2> | ||
<figure class="linked-attachment-container"> | ||
<a class="imgwrap-link" | ||
href ="<?php echo esc_url( get_attachment_link( get_post_thumbnail_id() ) ); ?>" | ||
title="<?php the_title_attribute( 'before=Permalink to: &after=' ); ?>"> | ||
<?php | ||
the_post_thumbnail( 'medium_large', array( | ||
'itemprop' => 'image', | ||
'class' => 'harmony-featured', | ||
'alt' => get_attachment_link( get_post_thumbnail_id() ) | ||
) | ||
); ?></a> | ||
</figure> | ||
</header> | ||
<div class="entry-content"> | ||
|
||
<?php the_content(); ?> | ||
|
||
<div class="link-pages"> | ||
<?php wp_link_pages(); ?> | ||
</div> | ||
|
||
</div><!-- .entry-content --> | ||
|
||
<div class="article-info"> | ||
|
||
<div class="post-footer"> | ||
<p><i class="ic-calendar-day"></i><span class="post_footer-date"> | ||
<?php printf( esc_attr( get_the_date() ) ); ?></span> | ||
<i class="ic-category-folder"></i><span><?php the_category( ' • ' ); ?></span> | ||
<i class="ic-tags-list"></i><span><?php the_tags('<em class="tags">', ' ', '</em>'); ?></span></p> | ||
</div> | ||
|
||
</div> | ||
|
||
</article><!-- #post-## --> |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
/** | ||
* The template part for displaying content | ||
* | ||
* @package ClassicPress | ||
* @subpackage Themename | ||
* @since Themename 1.0.0 | ||
*/ | ||
?> | ||
|
||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> | ||
<header class="content-title"> | ||
<?php | ||
the_title( | ||
sprintf( '<h2 class="article-title h4"><a href="%s" rel="bookmark">', | ||
esc_attr( esc_url( get_permalink() ) ) | ||
), | ||
'</a></h2>' | ||
); ?> | ||
</header> | ||
<div class="entry-content"> | ||
<?php | ||
the_excerpt(); | ||
?> | ||
</div><!-- .entry-content --> | ||
<div class="after-entry"> | ||
|
||
<?php //do_action( 'themename_after_entry' ); ?> | ||
|
||
</div> | ||
</article><!-- #post-## --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* The template for displaying the footer | ||
* | ||
* Contains the closing of the #content div and all content after | ||
* | ||
* @package: ClassicPress | ||
* @subpackage Harmony | ||
* @since Harmony 1.0.0 | ||
*/ | ||
?> | ||
<footer id="colophon" class="site-footer" role="contentinfo"> | ||
<div class="harmony-small-sidebar"> | ||
<?php get_sidebar(); ?> | ||
</div> | ||
<div class="site-info"> | ||
<p><span class="foot-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" | ||
rel="home"><?php bloginfo( 'name' ); ?></a></span> | ||
<?php | ||
if ( function_exists( 'the_privacy_policy_link' ) ) { | ||
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' ); | ||
} | ||
?> | ||
<small><a class="classicpress-credit" href="<?php echo esc_url( __( 'https://www.classicpress.net/', 'harmony' ) ); ?>" class="imprint"> | ||
<?php | ||
printf( esc_attr__( 'Proudly powered by %s', 'harmony' ), 'ClassicPress' ); | ||
?></a></small></p> | ||
</div><!-- .site-info --> | ||
<div class="harmony-btt"> | ||
<div class="upto"> | ||
<button class="back_to_top" onclick="backToTop();" | ||
title="<?php esc_attr_e('Top of page link', 'harmony'); ?>"><sup>^</sup></button> | ||
</div> | ||
</div> | ||
|
||
</footer><!-- .site-footer --> | ||
|
||
<?php wp_footer(); ?> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
<?php | ||
/** | ||
* Functions and definitions | ||
* | ||
* @package Harmony | ||
* @since 1.0.0 | ||
*/ | ||
|
||
namespace Harmony; | ||
|
||
if ( ! defined( 'ABSPATH' ) ) { | ||
exit( 'Direct script access denied.' ); | ||
} | ||
|
||
/* /////////////////////// Update Version Here. //////////////////// */ | ||
define( 'HARMONY_VERSION', '1.0.2' ); | ||
define( 'HARMONY_THEME', 'harmony' ); | ||
define( 'HARMONY_DIR', rtrim( get_template_directory(), '/' ) ); | ||
define( 'HARMONY_URL', rtrim( get_template_directory_uri(), '/' ) ); | ||
|
||
/** | ||
* Theme setup. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
add_action( 'after_setup_theme', __NAMESPACE__.'\setup_theme' ); | ||
function setup_theme() | ||
{ | ||
/* | ||
* Make theme available for translation. | ||
* Translations can be filed at WordPress.org. See: https://translate.wordpress.org/projects/wp-themes/twentysixteen | ||
* If you're building a theme based on harmony, use a find and replace | ||
* to change 'harmony' to the name of your theme in all the template files | ||
*/ | ||
load_theme_textdomain( 'harmony', | ||
get_template_directory_uri() . '/languages' ); | ||
|
||
// Add default posts and comments RSS feed links to head. | ||
add_theme_support( 'automatic-feed-links' ); | ||
|
||
// Let WordPress manage the document title. | ||
add_theme_support( 'title-tag' ); | ||
|
||
// Enable support for Post Thumbnails. | ||
add_theme_support( 'post-thumbnails' ); | ||
|
||
// Admin editor styles. | ||
add_theme_support( 'editor-styles' ); | ||
|
||
// Add support for responsive embeds. | ||
//add_theme_support( 'responsive-embeds' ); | ||
|
||
// Add theme support for selective refresh for widgets. | ||
//add_theme_support( 'customize-selective-refresh-widgets' ); | ||
|
||
// Enqueue editor styles. | ||
add_editor_style(); | ||
|
||
/* | ||
* Enable support for custom logo. | ||
* | ||
* @since Harmony 1.2 | ||
*/ | ||
add_theme_support( | ||
'custom-logo', | ||
array( | ||
'height' => 420, | ||
'width' => 680, | ||
'flex-height' => true, | ||
) | ||
); | ||
|
||
// add primary menu | ||
register_nav_menus( | ||
array( | ||
'primary' => __( 'Primary Menu', 'harmony' ), | ||
'secondary' => __( 'Very Top Menu', 'harmony' ), | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* Enqueue scripts and styles. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
add_action( | ||
'wp_enqueue_scripts', __NAMESPACE__.'\enqueue_scripts' ); | ||
function enqueue_scripts() | ||
{ | ||
wp_enqueue_style( 'harmony-style', | ||
HARMONY_URL . '/style.css', | ||
array(), | ||
HARMONY_VERSION | ||
); | ||
wp_enqueue_script( 'harmony-theme-script', | ||
HARMONY_URL . '/includes/harmony-theme.js', | ||
array( 'jquery' ), | ||
HARMONY_VERSION, | ||
false | ||
); | ||
// rtl style | ||
wp_style_add_data( 'harmony-style', | ||
'rtl', | ||
'replace' | ||
); | ||
// comment scripts | ||
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { | ||
wp_enqueue_script( | ||
'comment-reply' | ||
); | ||
} | ||
} | ||
|
||
/** #A4 | ||
* Registers a widget area. | ||
* | ||
* @link https://developer.wordpress.org/reference/functions/register_sidebar/ | ||
* | ||
* @since themename 1.0 | ||
*/ | ||
add_action( | ||
'widgets_init', __NAMESPACE__.'\load_widgets' ); | ||
function load_widgets() | ||
{ | ||
register_sidebar( | ||
array( | ||
'name' => __( 'Primary Sidebar', 'harmony' ), | ||
'id' => 'sidebar-primary', | ||
'description' => __( 'Appears before the footer section', 'harmony' ), | ||
'before_widget' => '<section id="%1$s" class="widget %2$s">', | ||
'after_widget' => '</section>', | ||
'before_title' => '<h2 class="widget-title">', | ||
'after_title' => '</h2>', | ||
) | ||
); | ||
} | ||
|
||
/** | ||
* Returns a custom logo, linked to home | ||
* | ||
* @since 1.0.1 | ||
*/ | ||
add_action( | ||
'harmony_render_logo', __NAMESPACE__.'\render_logo' ); | ||
function render_logo() | ||
{ | ||
if( has_custom_logo() ) : | ||
$logourl = esc_url( wp_get_attachment_url( get_theme_mod( 'custom_logo' ) ) ); | ||
|
||
echo '<img src="'. esc_url( $logourl ) .'" | ||
alt="'. esc_attr( get_bloginfo( 'name' ) ) .'" class="harmony-logo"/>'; | ||
endif; | ||
} | ||
|
||
/** | ||
* Return post thumbnail on excerpts | ||
* | ||
* @since 1.0.1 | ||
* @return Boolean | ||
*/ | ||
add_action( 'harmony_thumbnail', __NAMESPACE__.'\render_thumbnail' ); | ||
function render_thumbnail() | ||
{ | ||
// If there are images | ||
if ( has_post_thumbnail() ) { | ||
echo '<figure class="harmony-has-thumbnail">'; | ||
the_post_thumbnail(); | ||
echo '</figure>'; | ||
} else { | ||
echo '<span class="harmony-not-thumbnail"></span>'; | ||
} | ||
} | ||
|
||
/** | ||
* Include helper files | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
require( HARMONY_DIR . '/includes/customizer.php' ); | ||
|
||
if ( is_admin() ) : | ||
require( HARMONY_DIR . '/includes/theme-admin-menu.php' ); | ||
endif; | ||
|
Oops, something went wrong.