From 3ecd506984dd728559778ba5dda27007adeac966 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Wed, 25 Jun 2014 15:06:18 -0400 Subject: [PATCH 1/3] Theme Customizer Adding theme customization options, removed glypicons form footer. --- inc/customizer.php | 91 ---------------------------------------------- style.css | 4 ++ style.scss | 4 +- 3 files changed, 7 insertions(+), 92 deletions(-) diff --git a/inc/customizer.php b/inc/customizer.php index f57584f..2506830 100755 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -132,97 +132,6 @@ function huskypress_parentSite_register( $wp_customize ) -function huskypress_customize_register( $wp_customize ) -{ - //1. Define a new section (if desired) to the Theme Customizer - $wp_customize->add_section( 'huskypress_options', - array( - 'title' => __( 'Template Options', 'mytheme' ), //Visible title of section - 'priority' => 35, //Determines what order this appears in - 'capability' => 'edit_theme_options', //Capability needed to tweak - 'description' => __('Allows you to customize header color and school, college, or division settings for Hale', 'huskypress'), //Descriptive tooltip - ) - ); - $wp_customize->add_setting( 'secondarytitle', //Give it a SERIALIZED name (so all theme settings can live under one db record) - array( - 'type' => 'option', //Is this an 'option' or a 'theme_mod'? - 'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting. - 'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? - ) - ); - $wp_customize->add_control('secondarytitle', array( - 'type' => 'text', - 'label' => 'School, College, Division, Department, etc.', - 'section' => 'huskypress_options' - ) - ); - $wp_customize->add_setting( 'secondarylink', //Give it a SERIALIZED name (so all theme settings can live under one db record) - array( - 'type' => 'option', //Is this an 'option' or a 'theme_mod'? - 'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting. - 'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? - ) - ); - $wp_customize->add_control('secondarylink', array( - 'type' => 'text', - 'label' => 'Link To School, College, Division, Department (Must be UConn.edu or UCHC.edu)', - 'section' => 'huskypress_options' - ) - ); - $wp_customize->add_setting( 'homepagelayout', //Give it a SERIALIZED name (so all theme settings can live under one db record) - array( - 'default' => '3-3', //Default setting/value to save - 'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'? - 'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting. - 'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? - ) - ); - - // new stuff added - $wp_customize->add_setting( 'themeColor', //Give it a SERIALIZED name (so all theme settings can live under one db record) - array( - 'default' => 'blue', //Default setting/value to save - 'type' => 'theme_mod', //Is this an 'option' or a 'theme_mod'? - 'capability' => 'edit_theme_options', //Optional. Special permissions for accessing this setting. - 'transport' => 'refresh', //What triggers a refresh of the setting? 'refresh' or 'postMessage' (instant)? - ) - ); - $wp_customize->add_control('themeColor', array( - 'type' => 'radio', - 'label' => 'Theme Color', - 'section' => 'huskypress_options', - 'choices' => array( - 'blue'=>'Blue', - 'red' => 'Red', - 'orange' => 'Orange', - 'green' => 'Green', - 'purple'=>'Purple' - ) - ) - ); - $wp_customize->add_control('homepagelayout', array( - 'type' => 'radio', - 'label' => 'Homepage Layout', - 'section' => 'huskypress_options', - 'choices' => array( - '2L'=>'Large left', - '2L_sub' => 'Large left, subdivided', - '2R'=>'Large right', - '2R_sub'=>'Large right, subdivided', - '3'=>'Three even', - '3W'=>'Three columns, wide center', - '3W_sub'=>'Three columns, wide center, subdivided', - '1-2'=>'Large top, two bottom', - '1-3'=>'Large top, three bottom', - '2L-3'=>'Large top left, three bottom', - '2R-3'=>'Large top right, three bottom', - '3-3'=>'Large center top, large center bottom', - '3-4'=>'Large center top, four bottom' - ) - ) - ); -} -add_action( 'customize_register', 'huskypress_customize_register' ); diff --git a/style.css b/style.css index 23ccb48..b32dc16 100755 --- a/style.css +++ b/style.css @@ -130,6 +130,10 @@ Text Domain: cs max-width: 100%; } +#footer .glyphicon { + display: none; +} + img { height: auto; max-width: 100%; diff --git a/style.scss b/style.scss index c6027be..34a3905 100644 --- a/style.scss +++ b/style.scss @@ -148,7 +148,9 @@ url('../../global/fonts/proximanova_semibold/ProximaNova-Sbold-webfont.ttf') for - +#footer .glyphicon { + display:none; +} From 525138ce569002e1fb036ca1fed4b9b96fff15f1 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Wed, 25 Jun 2014 15:59:43 -0400 Subject: [PATCH 2/3] Cleaning up Page.php --- page.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/page.php b/page.php index 473389d..5d32dcb 100755 --- a/page.php +++ b/page.php @@ -11,7 +11,6 @@ */ get_header(); ?> -

page.php

">
-

Sidebar?

- '.$side.' '; - ?> + @@ -59,5 +52,5 @@ dynamic_sidebar( $sidebar ); echo '
'; } ?> - - + + \ No newline at end of file From 3f0ec3e01bfe389211fcd76b323af7c48cc51250 Mon Sep 17 00:00:00 2001 From: andrewmbacon Date: Thu, 26 Jun 2014 08:53:02 -0400 Subject: [PATCH 3/3] Cleaning Up for Development Removed on screen comments Enabled sidebars Enabled page specific sidebars Added div for widget content vs widget header. Adjusted blog nav --- archive.php | 189 +++++++++++++++++++++--------------------- content.php | 1 - inc/extras.php | 2 +- inc/reg-sidebars.php | 35 +++++++- inc/template-tags.php | 8 +- index.php | 32 +------ page.php | 11 +-- search.php | 37 +-------- sidebar.php | 4 +- single.php | 48 ++++++----- style.css | 40 +++++++-- style.scss | 52 +++++++++--- 12 files changed, 241 insertions(+), 218 deletions(-) diff --git a/archive.php b/archive.php index ca9aa3b..9278675 100755 --- a/archive.php +++ b/archive.php @@ -8,98 +8,101 @@ */ get_header(); ?> -

archive.php

-
-
+
+
+
+
+ + + +
', $term_description ); + endif; + ?> + + + + + + + + + + + + + + + + + +
+
+ + + - - - - - - - - - - - - - - - - - - - - - - - diff --git a/content.php b/content.php index f7d45a5..97c8737 100755 --- a/content.php +++ b/content.php @@ -5,7 +5,6 @@ */ ?> -

Content.php

>
', esc_url( get_permalink() ) ), '' ); ?> diff --git a/inc/extras.php b/inc/extras.php index b0478bc..6b556f8 100755 --- a/inc/extras.php +++ b/inc/extras.php @@ -86,4 +86,4 @@ function cs_setup_author() { $GLOBALS['authordata'] = get_userdata( $wp_query->post->post_author ); } } -add_action( 'wp', 'cs_setup_author' ); +add_action( 'wp', 'cs_setup_author' ); \ No newline at end of file diff --git a/inc/reg-sidebars.php b/inc/reg-sidebars.php index 7535e5c..4257f99 100644 --- a/inc/reg-sidebars.php +++ b/inc/reg-sidebars.php @@ -8,10 +8,14 @@ if ( function_exists('register_sidebar') ) { register_sidebar(array( - 'name' => 'Sidebar', - 'id' => 'sidebar', - 'before_title' => '

', - 'after_title' => '

', + 'name' => __( 'Sidebar', 'theme_text_domain' ), + 'id' => 'sidebar', + 'description' => 'Appears with Archives, Search Results, the Blog page template, and when viewing single posts.', + 'class' => 'sidebar', + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

' )); register_sidebar(array( 'name' => 'Home1', @@ -69,6 +73,29 @@ )); } +register_sidebar( array( + 'name' => __( 'Header Widget Area', 'theme' ), + 'id' => 'header-widget-area', + 'before_widget' => '', + 'before_title' => '

', + 'after_title' => '

', +) ); + +// if no title then add widget content wrapper to before widget +add_filter( 'dynamic_sidebar_params', 'check_sidebar_params' ); +function check_sidebar_params( $params ) { + global $wp_registered_widgets; + + $settings_getter = $wp_registered_widgets[ $params[0]['widget_id'] ]['callback'][0]; + $settings = $settings_getter->get_settings(); + $settings = $settings[ $params[1]['number'] ]; + + if ( $params[0][ 'after_widget' ] == '
' && isset( $settings[ 'title' ] ) && empty( $settings[ 'title' ] ) ) + $params[0][ 'before_widget' ] .= '
'; + + return $params; +} ?> \ No newline at end of file diff --git a/inc/template-tags.php b/inc/template-tags.php index 02c4e80..f11c464 100755 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -18,7 +18,6 @@ function cs_paging_nav() { } ?>
'; - dynamic_sidebar( $sidebar ); - echo ''; - } ?> + if ( is_active_sidebar( $sidebar ) ) { + echo '
'; + dynamic_sidebar( $sidebar ); + echo '
'; + } + ?> \ No newline at end of file diff --git a/search.php b/search.php index 27c0822..32d7eea 100755 --- a/search.php +++ b/search.php @@ -6,26 +6,9 @@ */ get_header(); ?> -

search.php

- -
- -
@@ -53,25 +36,7 @@
- - - -
- -
- +
diff --git a/sidebar.php b/sidebar.php index 09698c8..507b357 100755 --- a/sidebar.php +++ b/sidebar.php @@ -5,8 +5,8 @@ * @package cornerstone */ ?> -