From e99a64635c13e71f9acf7664b733ddbf3a70ddb8 Mon Sep 17 00:00:00 2001 From: Jess Ward <jess@jward.io> Date: Fri, 20 May 2016 13:55:34 -0400 Subject: [PATCH] removed page-header for categories --- archive.php | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ header.php | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ style.css | 5 +++++ 3 files changed, 133 insertions(+) create mode 100644 archive.php create mode 100644 header.php diff --git a/archive.php b/archive.php new file mode 100644 index 0000000..2de413e --- /dev/null +++ b/archive.php @@ -0,0 +1,63 @@ +<?php +/** + * The template for displaying Archive pages. + * + * Learn more: http://codex.wordpress.org/Template_Hierarchy + * + * @package Emphaino + * @since Emphaino 1.0 + */ + +get_header(); ?> + + <section id="primary" class="content-area"> + <div id="content" class="site-content" role="main"> + + <?php if ( have_posts() ) : ?> + + <?php + if ( is_category() ) { + // show an optional category description + $category_description = category_description(); + if ( ! empty( $category_description ) ) + echo apply_filters( 'category_archive_meta', '<div class="taxonomy-description">' . $category_description . '</div>' ); + + } elseif ( is_tag() ) { + // show an optional tag description + $tag_description = tag_description(); + if ( ! empty( $tag_description ) ) + echo apply_filters( 'tag_archive_meta', '<div class="taxonomy-description">' . $tag_description . '</div>' ); + } + ?> + </header><!-- .page-header --> + + <?php if ( 'dynamic_grid_excerpts' == get_theme_mod( 'posts_layout', emphaino_default_settings('posts_layout') ) ) echo '<div id="dynamic-grid" class="clearfix">'; ?> + + <?php /* Start the Loop */ ?> + <?php while ( have_posts() ) : the_post(); ?> + + <?php + /* Include the Post-Format-specific template for the content. + * If you want to overload 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 if ( 'dynamic_grid_excerpts' == get_theme_mod( 'posts_layout', emphaino_default_settings('posts_layout') ) ) echo '</div> <!-- #dynamic-grid -->'; ?> + + <?php emphaino_content_nav( 'nav-below' ); ?> + + <?php else : ?> + + <?php get_template_part( 'no-results', 'archive' ); ?> + + <?php endif; ?> + + </div><!-- #content .site-content --> + </section><!-- #primary .content-area --> + +<?php if( get_theme_mod( 'sidebar_in_posts_index' ) == 'on' ) get_sidebar(); ?> +<?php get_footer(); ?> diff --git a/header.php b/header.php new file mode 100644 index 0000000..bd416d6 --- /dev/null +++ b/header.php @@ -0,0 +1,65 @@ +<?php +/** + * The Header for our theme. + * + * Displays all of the <head> section and everything up till <div id="main"> + * + * @package Emphaino + * @since Emphaino 1.0 + */ +?><!DOCTYPE html> +<html class="no-js" <?php language_attributes(); ?>> +<head> +<meta charset="<?php bloginfo( 'charset' ); ?>" /> +<?php if( get_theme_mod('non_responsive') != 'on' ): ?> +<meta name="viewport" content="width=device-width" /> +<?php endif; ?> +<link rel="profile" href="http://gmpg.org/xfn/11" /> +<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" /> +<!--[if lt IE 9]> +<script src="<?php echo get_template_directory_uri(); ?>/js/html5.js" type="text/javascript"></script> +<![endif]--> + +<?php wp_head(); ?> +</head> + +<body <?php body_class(); ?>> +<div id="page" class="hfeed site"> + <?php do_action( 'before' ); ?> + + + <header id="masthead" class="site-header" role="banner"> + <div id="top-bar"> + <nav role="navigation" class="site-navigation main-navigation"> + <div class="home-page-link"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="icon-home" title ="<?php _e('Home', 'emphaino'); ?>"><span>Home</span></a></div> + + <?php if( $emphaino_menu = wp_nav_menu( array( 'theme_location' => 'primary', 'fallback_cb' => '', 'echo' => false ) ) ): ?> + + <h1 class="assistive-text icon-menu"><span><?php _e( 'Menu', 'emphaino' ); ?></span></h1> + <div class="assistive-text skip-link"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'emphaino' ); ?>"><?php _e( 'Skip to content', 'emphaino' ); ?></a></div> + <?php echo $emphaino_menu; ?> + + <?php endif; ?> + + + </nav> <!-- .site-navigation .main-navigation --> + + <?php get_search_form(); ?> + + </div> + + <div class="header-main"> + <?php if( $emphaino_logo_image = get_theme_mod('logo_image') ) : ?> + <div id="logo-image"> + <a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><img src="<?php echo $emphaino_logo_image; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" /></a> + </div> + <?php endif; ?> + <div class="site-branding"> + <h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1> + <h2 class="site-description"><?php bloginfo( 'description' ); ?></h2> + </div> + </div> + + </header><!-- #masthead .site-header --> + + <div id="main" class="site-main"> diff --git a/style.css b/style.css index 7e0389f..07f0778 100644 --- a/style.css +++ b/style.css @@ -11,6 +11,11 @@ */ /* Remove content type icons */ + +.page-header { + color: #000000; +} + .format-image .entry-title:before, .single-format-image .entry-title:before, .format-gallery .entry-title:before, .single-format-gallery .entry-title:before, .format-chat .entry-title:before, .single-format-chat .entry-title:before, -- GitLab