Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Conflicts:
	style.css
  • Loading branch information
Jessika Mika Caldera authored and Jessika Mika Caldera committed Jun 26, 2014
2 parents a99da07 + 3f0ec3e commit b846c81
Show file tree
Hide file tree
Showing 13 changed files with 253 additions and 316 deletions.
189 changes: 96 additions & 93 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,98 +8,101 @@
*/

get_header(); ?>
<h1>archive.php</h1>
<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div class="row">
<div class="col-sm-9">
<section id="primary" class="content-area">
<main id="main" class="site-main" role="main">

<?php if ( have_posts() ) : ?>

<header class="page-header">
<h1 class="page-title">
<?php
if ( is_category() ) :
single_cat_title();

elseif ( is_tag() ) :
single_tag_title();

elseif ( is_author() ) :
printf( __( 'Author: %s', 'cs' ), '<span class="vcard">' . get_the_author() . '</span>' );

elseif ( is_day() ) :
printf( __( 'Day: %s', 'cs' ), '<span>' . get_the_date() . '</span>' );

elseif ( is_month() ) :
printf( __( 'Month: %s', 'cs' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'cs' ) ) . '</span>' );

elseif ( is_year() ) :
printf( __( 'Year: %s', 'cs' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'cs' ) ) . '</span>' );

elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
_e( 'Asides', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
_e( 'Galleries', 'cs');

elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
_e( 'Images', 'cs');

elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
_e( 'Videos', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
_e( 'Quotes', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
_e( 'Links', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-status' ) ) :
_e( 'Statuses', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
_e( 'Audios', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-chat' ) ) :
_e( 'Chats', 'cs' );

else :
_e( 'Archives', 'cs' );

endif;
?>
</h1>
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
</header><!-- .page-header -->

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>

<?php endwhile; ?>

<?php cs_paging_nav(); ?>

<?php else : ?>

<?php get_template_part( 'content', 'none' ); ?>

<?php endif; ?>

</main><!-- #main -->
</section><!-- #primary -->
</div>
<?php get_sidebar(); ?>
</div>

<?php if ( have_posts() ) : ?>

<header class="page-header">
<h1 class="page-title">
<?php
if ( is_category() ) :
single_cat_title();

elseif ( is_tag() ) :
single_tag_title();

elseif ( is_author() ) :
printf( __( 'Author: %s', 'cs' ), '<span class="vcard">' . get_the_author() . '</span>' );

elseif ( is_day() ) :
printf( __( 'Day: %s', 'cs' ), '<span>' . get_the_date() . '</span>' );

elseif ( is_month() ) :
printf( __( 'Month: %s', 'cs' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'cs' ) ) . '</span>' );

elseif ( is_year() ) :
printf( __( 'Year: %s', 'cs' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'cs' ) ) . '</span>' );

elseif ( is_tax( 'post_format', 'post-format-aside' ) ) :
_e( 'Asides', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-gallery' ) ) :
_e( 'Galleries', 'cs');

elseif ( is_tax( 'post_format', 'post-format-image' ) ) :
_e( 'Images', 'cs');

elseif ( is_tax( 'post_format', 'post-format-video' ) ) :
_e( 'Videos', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-quote' ) ) :
_e( 'Quotes', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-link' ) ) :
_e( 'Links', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-status' ) ) :
_e( 'Statuses', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-audio' ) ) :
_e( 'Audios', 'cs' );

elseif ( is_tax( 'post_format', 'post-format-chat' ) ) :
_e( 'Chats', 'cs' );

else :
_e( 'Archives', 'cs' );

endif;
?>
</h1>
<?php
// Show an optional term description.
$term_description = term_description();
if ( ! empty( $term_description ) ) :
printf( '<div class="taxonomy-description">%s</div>', $term_description );
endif;
?>
</header><!-- .page-header -->

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<?php
/* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'content', get_post_format() );
?>

<?php endwhile; ?>

<?php cs_paging_nav(); ?>

<?php else : ?>

<?php get_template_part( 'content', 'none' ); ?>

<?php endif; ?>

</main><!-- #main -->
</section><!-- #primary -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>
1 change: 0 additions & 1 deletion content.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
?>
<h1>Content.php</h1>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
Expand Down
91 changes: 0 additions & 91 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );



Expand Down
2 changes: 1 addition & 1 deletion inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
35 changes: 31 additions & 4 deletions inc/reg-sidebars.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@

if ( function_exists('register_sidebar') ) {
register_sidebar(array(
'name' => 'Sidebar',
'id' => 'sidebar',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
'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' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</div></aside>',
'before_title' => '<div class="widget-head"><h2 class="widget-title">',
'after_title' => '</h2></div><div class="widget-content">'
));
register_sidebar(array(
'name' => 'Home1',
Expand Down Expand Up @@ -69,6 +73,29 @@
));

}
register_sidebar( array(
'name' => __( 'Header Widget Area', 'theme' ),
'id' => 'header-widget-area',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h1 class="widget-title">',
'after_title' => '</h1>',
) );

// 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' ] == '</div></aside>' && isset( $settings[ 'title' ] ) && empty( $settings[ 'title' ] ) )
$params[0][ 'before_widget' ] .= '<div class="widget-content">';

return $params;
}


?>
8 changes: 3 additions & 5 deletions inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ function cs_paging_nav() {
}
?>
<nav class="navigation paging-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Posts navigation', 'cs' ); ?></h1>
<div class="nav-links">

<?php if ( get_next_posts_link() ) : ?>
Expand Down Expand Up @@ -49,11 +48,10 @@ function cs_post_nav() {
}
?>
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text"><?php _e( 'Post navigation', 'cs' ); ?></h1>
<div class="nav-links">
<div class="nav-links row">
<?php
previous_post_link( '<div class="nav-previous">%link</div>', _x( '<span class="meta-nav">&larr;</span> %title', 'Previous post link', 'cs' ) );
next_post_link( '<div class="nav-next">%link</div>', _x( '%title <span class="meta-nav">&rarr;</span>', 'Next post link', 'cs' ) );
previous_post_link( '<div class="col-sm-6 nav-previous">%link</div>', _x( '<span class="meta-nav">&larr;</span> Previous', 'Previous post link', 'cs' ) );
next_post_link( '<div class="col-sm-6 nav-next">%link</div>', _x( 'Next <span class="meta-nav">&rarr;</span>', 'Next post link', 'cs' ) );
?>
</div><!-- .nav-links -->
</nav><!-- .navigation -->
Expand Down
Loading

0 comments on commit b846c81

Please sign in to comment.