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 bbf4f0b
Showing
7 changed files
with
2,992 additions
and
0 deletions.
There are no files selected for viewing
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,23 @@ | ||
# Amazing Times | ||
|
||
News/Magazine theme for the Genesis Framework | ||
|
||
## Demo | ||
|
||
Demo link: http://bradpotter.com/themes/amazing-times | ||
|
||
## GitHub | ||
|
||
Github project link: https://github.com/bradpotter/amazing-times | ||
|
||
## Mission | ||
|
||
Create free and/or low cost quality products for the Genesis Community | ||
|
||
## Requirements | ||
|
||
WordPress 4.1 and The Genesis Framework | ||
|
||
## Support | ||
|
||
This theme is provided as is without support. Use at your own risk. My themes are intended to be used by those who are experienced with the Genesis Theme Framework. Time does not permit me to assist you in building your website and/or making modifications to this theme for you. Please feel free to point out any bugs you may find and I will attempt to fix them when possible. |
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,150 @@ | ||
<?php | ||
/** | ||
* Color Scheme | ||
* | ||
* @package Color Scheme | ||
* @author Brad Potter | ||
* @license GPL-2.0+ | ||
* @copyright Copyright (c) 2014, Brad Potter | ||
*/ | ||
|
||
/** | ||
* Add custom body class for Color Scheme | ||
* | ||
*/ | ||
function color_scheme_class( $classes ) { | ||
$classes[] = 'color-scheme'; | ||
return $classes; | ||
} | ||
add_filter( 'body_class', 'color_scheme_class', 45 ); | ||
|
||
/** | ||
* Registers color scheme options with the WordPress Theme Customizer | ||
* | ||
*/ | ||
function register_customizer_color_scheme( $wp_customize ) { | ||
|
||
|
||
/* - - - - - Color Scheme Section - - - - - */ | ||
|
||
$wp_customize->add_section( 'color_scheme_section', array( | ||
'title' => __( 'Color Scheme', 'amazing-times' ), | ||
'priority' => 10, | ||
) ); | ||
|
||
/* - - - - - Base Color - - - - - */ | ||
|
||
$wp_customize->add_setting( | ||
'color_scheme_base_color', | ||
array( | ||
'default' => '', | ||
'transport' => 'refresh' | ||
) | ||
); | ||
|
||
$wp_customize->add_control( | ||
new WP_Customize_Color_Control( | ||
$wp_customize, | ||
'color_scheme_base_color', | ||
array( | ||
'label' => __( 'Base Color', 'amazing-times' ), | ||
'section' => 'color_scheme_section', | ||
'settings' => 'color_scheme_base_color', | ||
'priority' => 10, | ||
) | ||
) | ||
); | ||
|
||
/* - - - - - Site Title Color - - - - - */ | ||
|
||
$wp_customize->add_setting( | ||
'color_scheme_title_color', | ||
array( | ||
'default' => '', | ||
'transport' => 'refresh' | ||
) | ||
); | ||
|
||
$wp_customize->add_control( | ||
new WP_Customize_Color_Control( | ||
$wp_customize, | ||
'color_scheme_title_color', | ||
array( | ||
'label' => __( 'Site Title Color', 'amazing-times' ), | ||
'section' => 'color_scheme_section', | ||
'settings' => 'color_scheme_title_color', | ||
'priority' => 20, | ||
) | ||
) | ||
); | ||
|
||
/* - - - - - Site Description Color - - - - - */ | ||
|
||
$wp_customize->add_setting( | ||
'color_scheme_description_color', | ||
array( | ||
'default' => '', | ||
'transport' => 'refresh' | ||
) | ||
); | ||
|
||
$wp_customize->add_control( | ||
new WP_Customize_Color_Control( | ||
$wp_customize, | ||
'color_scheme_description_color', | ||
array( | ||
'label' => __( 'Site Description Color', 'amazing-times' ), | ||
'section' => 'color_scheme_section', | ||
'settings' => 'color_scheme_description_color', | ||
'priority' => 30, | ||
) | ||
) | ||
); | ||
|
||
} | ||
add_action( 'customize_register', 'register_customizer_color_scheme' ); | ||
|
||
/** | ||
* Write styles to head if a Customizer control is selected | ||
* | ||
*/ | ||
function customizer_color_scheme_css() { | ||
?> | ||
<!--Customizer CSS--> | ||
<style type="text/css"> | ||
<?php | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme a { color: %s; }', $csbc_color ); } | ||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme a:hover { color: #222; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .site-header { background-color: %s; }', $csbc_color ); } | ||
$cstc_color = get_theme_mod( 'color_scheme_title_color' ); if ( $cstc_color ) { printf( '.color-scheme .site-title a { color: %s; }', $cstc_color ); } | ||
$csdc_color = get_theme_mod( 'color_scheme_description_color' ); if ( $csdc_color ) { printf( '.color-scheme .site-description { color: %s; }', $csdc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .nav-primary .genesis-nav-menu a:hover, .color-scheme .nav-primary .genesis-nav-menu .current-menu-item > a, .color-scheme .nav-primary .genesis-nav-menu .sub-menu a:hover, .color-scheme .nav-primary .genesis-nav-menu .sub-menu .current-menu-item > a:hover { color: %s; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .nav-secondary .genesis-nav-menu a:hover, .color-scheme .nav-secondary .genesis-nav-menu .current-menu-item > a, .color-scheme .nav-secondary .genesis-nav-menu .sub-menu a:hover, .color-scheme .nav-secondary .genesis-nav-menu .sub-menu .current-menu-item > a:hover { color: %s; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .nav-tertiary .genesis-nav-menu a:hover, .color-scheme .nav-tertiary .genesis-nav-menu .current-menu-item > a, .color-scheme .nav-tertiary .genesis-nav-menu .sub-menu a:hover, .color-scheme .nav-tertiary .genesis-nav-menu .sub-menu .current-menu-item > a:hover { color: %s; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .genesis-nav-menu > .facebook:before, .color-scheme .genesis-nav-menu > .twitter:before { color: %s; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .entry-title a { color: #222; }', $csbc_color ); } | ||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .entry-title a:hover { color: %s; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .enews-widget input[type="submit"] { background-color: %s; }', $csbc_color ); } | ||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .enews-widget input:hover[type="submit"] { background-color: #666; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme button, input[type="button"], .color-scheme input[type="reset"], .color-scheme input[type="submit"], .color-scheme .button { background-color: %s; }', $csbc_color ); } | ||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme button:hover, .color-scheme input:hover[type="button"], .color-scheme input:hover[type="reset"], .color-scheme input:hover[type="submit"], .color-scheme .button:hover { background-color: #222; }', $csbc_color ); } | ||
|
||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .archive-pagination li a:hover, .archive-pagination .active a { background-color: %s; }', $csbc_color ); } | ||
$csbc_color = get_theme_mod( 'color_scheme_base_color' ); if ( $csbc_color ) { printf( '.color-scheme .archive-pagination li a:hover, .archive-pagination .active a { color: #fff; }', $csbc_color ); } | ||
|
||
?> | ||
|
||
</style> | ||
<!--/Customizer CSS--> | ||
<?php | ||
} | ||
add_action( 'wp_head', 'customizer_color_scheme_css' ); |
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,97 @@ | ||
<?php | ||
/** | ||
* This file adds the Home Page to the Amazing Times Theme. | ||
* | ||
* @author Brad Potter | ||
* @package Amazing Times | ||
* @subpackage Customizations | ||
*/ | ||
|
||
add_action( 'genesis_meta', 'amazingtimes_home_meta' ); | ||
/** | ||
* Add widget support for homepage. If no widgets active, display the default loop. | ||
* | ||
*/ | ||
function amazingtimes_home_meta() { | ||
|
||
if ( is_active_sidebar( 'home-featured-full' ) || is_active_sidebar( 'home-top-full' ) || is_active_sidebar( 'home-middle-full' ) || is_active_sidebar( 'home-bottom-full' ) ) { | ||
|
||
//* Force full-width-content layout setting | ||
//* add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | ||
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); | ||
|
||
//* Remove breadcrumbs | ||
//* remove_action( 'genesis_before_content_sidebar_wrap', 'genesis_do_breadcrumbs' ); | ||
|
||
//* Remove the default Genesis loop | ||
remove_action( 'genesis_loop', 'genesis_do_loop' ); | ||
|
||
//* Add home featured area | ||
add_action( 'genesis_loop', 'amazingtimes_home_featured', 1 ); | ||
|
||
//* Add home widget areas | ||
add_action( 'genesis_loop', 'amazingtimes_home_widgets', 1 ); | ||
|
||
} | ||
} | ||
|
||
function amazingtimes_body_class( $classes ) { | ||
|
||
$classes[] = 'amazingtimes-home'; | ||
return $classes; | ||
|
||
} | ||
|
||
function amazingtimes_home_featured() { | ||
|
||
if ( is_active_sidebar( 'home-featured-full' ) ) { | ||
|
||
echo '<div class="home-featured">'; | ||
|
||
genesis_widget_area( 'home-featured-full', array( | ||
'before' => '<div class="home-featured-full widget-area"><div class="wrap">', | ||
'after' => '</div></div>', | ||
) ); | ||
|
||
echo '</div>'; | ||
|
||
} | ||
|
||
} | ||
|
||
function amazingtimes_home_widgets() { | ||
|
||
if ( is_active_sidebar( 'home-top-full' ) || is_active_sidebar( 'home-middle-full' ) || is_active_sidebar( 'home-bottom-full' ) ) { | ||
|
||
echo '<div class="home-top">'; | ||
|
||
genesis_widget_area( 'home-top-full', array( | ||
'before' => '<div class="home-top-full widget-area"><div class="wrap">', | ||
'after' => '</div></div>', | ||
) ); | ||
|
||
echo '</div>'; | ||
|
||
echo '<div class="home-middle">'; | ||
|
||
genesis_widget_area( 'home-middle-full', array( | ||
'before' => '<div class="home-middle-full widget-area"><div class="wrap">', | ||
'after' => '</div></div>', | ||
) ); | ||
|
||
echo '</div>'; | ||
|
||
echo '<div class="home-bottom">'; | ||
|
||
genesis_widget_area( 'home-bottom-full', array( | ||
'before' => '<div class="home-bottom-full widget-area"><div class="wrap">', | ||
'after' => '</div></div>', | ||
) ); | ||
|
||
echo '</div>'; | ||
|
||
} | ||
|
||
} | ||
|
||
genesis(); |
Oops, something went wrong.