Skip to content

Commit

Permalink
update templates
Browse files Browse the repository at this point in the history
  • Loading branch information
timelsass committed Oct 19, 2018
1 parent 35b70e0 commit 323bd14
Show file tree
Hide file tree
Showing 24 changed files with 122 additions and 28 deletions.
1 change: 1 addition & 0 deletions base.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<?php do_action( 'boldgrid_header_after' ); ?>
<?php do_action( 'boldgrid_content_before' ); ?>
<div id="content" <?php BoldGrid::add_class( 'site_content', [ 'site-content' ] ); ?> role="document">
<?php get_template_part( 'templates/page-headers' ); ?>
<main <?php BoldGrid::add_class( 'main', [ 'main' ] ); ?>>
<?php do_action( 'boldgrid_main_top' ); ?>
<?php include Boldgrid_Framework_Wrapper::boldgrid_template_path(); ?>
Expand Down
12 changes: 2 additions & 10 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@
* @package Prime
*/

if ( is_archive() ) :
get_template_part( 'templates/page-header', 'archive' );
endif;

if ( ! is_front_page() && is_home() ) {
get_template_part( 'templates/page-header', 'blog' );
}

if ( ! have_posts() ) :
if ( ! have_posts() ) {
get_template_part( 'templates/content', 'none' );
endif;
}

if ( ( is_home() || is_archive() ) && 'above' === get_theme_mod( 'bgtfw_global_title_position' ) ) {
if ( have_posts() ) {
Expand Down
1 change: 0 additions & 1 deletion templates/comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*
* @package Prime
*/

if ( post_password_required() ) {
return;
}
Expand Down
1 change: 0 additions & 1 deletion templates/content-none.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @package Prime
*/
?>

<section class="no-results not-found">
<div class="jumbotron text-center">
<div class="container">
Expand Down
3 changes: 0 additions & 3 deletions templates/content-page.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php do_action( 'before_entry_title' ); ?>
<?php get_template_part( 'templates/entry-header-page' ); ?>
<?php do_action( 'after_entry_title' ); ?>
<div class ="article-wrapper">
<div class="entry-content">
<?php the_content(); ?>
Expand Down
9 changes: 9 additions & 0 deletions templates/content-search.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Search Content
*
* This file contains the markup for the search page template.
*
* @package Prime
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php get_template_part( 'templates/entry-header' ); ?>
<div class="entry-summary">
Expand Down
4 changes: 0 additions & 4 deletions templates/content-single.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
* @package Prime
*/
?>

<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php do_action( 'before_entry_title' ); ?>
<?php get_template_part( 'templates/entry-header-single', get_post_format() ); ?>
<?php do_action( 'after_entry_title' ); ?>
<div class ="article-wrapper">
<div class="entry-content">
<?php the_content(); ?>
Expand Down
1 change: 0 additions & 1 deletion templates/content.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @package Prime
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_home() || is_archive() ) : ?>
<?php get_template_part( 'templates/post-list-header', get_theme_mod( 'bgtfw_blog_post_header_feat_image_position' ) ); ?>
Expand Down
1 change: 0 additions & 1 deletion templates/entry-footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @package Prime
*/
?>

<div class="bgtfw <?php echo BoldGrid::print_container_class( 'entry-footer' )?>">
<?php bgtfw_edit_post_link(); ?>
</div>
10 changes: 10 additions & 0 deletions templates/entry-header-page.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Page Entry Header
*
* This file contains the markup for page entry headers.
*
* @package Prime
*/
do_action( 'before_entry_title' ); ?>
<div <?php BoldGrid::add_class( 'page_header_wrapper', [ 'page-header-wrapper', get_theme_mod( 'bgtfw_global_title_background_container' ) ] ); ?>>
<header <?php BoldGrid::add_class( 'page_page_title', [ 'entry-header', 'page-header', has_post_thumbnail( get_option( 'page_for_posts', true ) ) ? 'has-featured-image-header' : '' ] ); ?> <?php bgtfw_featured_img_bg( $post->ID ); ?>>
<div <?php BoldGrid::add_class( 'featured_image_page', [ 'featured-imgage-header', get_theme_mod( 'bgtfw_global_title_content_container' ) ] ); ?>>
Expand All @@ -10,3 +19,4 @@
</div>
</header><!-- .entry-header -->
</div>
<?php do_action( 'after_entry_title' ); ?>
10 changes: 10 additions & 0 deletions templates/entry-header-single.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Single Entry Header
*
* This file contains the markup for single post entry headers.
*
* @package Prime
*/
do_action( 'before_entry_title' ); ?>
<div <?php BoldGrid::add_class( 'page_header_wrapper', [ 'page-header-wrapper', get_theme_mod( 'bgtfw_global_title_background_container' ) ] ); ?>>
<header <?php BoldGrid::add_class( 'single_page_title', [ 'entry-header', 'page-header', has_post_thumbnail( get_option( 'page_for_posts', true ) ) ? 'has-featured-image-header' : '' ] ); ?> <?php bgtfw_featured_img_bg( $post->ID ); ?>>
<div <?php BoldGrid::add_class( 'featured_image_single', [ 'featured-imgage-header', get_theme_mod( 'bgtfw_global_title_content_container' ) ] ); ?>>
Expand All @@ -10,3 +19,4 @@
</div>
</header><!-- .entry-header -->
</div>
<?php do_action( 'after_entry_title' ); ?>
10 changes: 10 additions & 0 deletions templates/entry-header.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Entry Header
*
* This file contains the markup for entry headers.
*
* @package Prime
*/
do_action( 'before_entry_title' ); ?>
<header <?php BoldGrid::add_class( 'entry_header', [ 'entry-header' ] ); ?> <?php bgtfw_featured_img_bg( $post->ID ); ?>>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?>>
<?php if ( is_single() ) : ?>
Expand All @@ -14,3 +23,4 @@
<?php endif; ?>
</div>
</header><!-- .entry-header -->
<?php do_action( 'after_entry_title' ); ?>
1 change: 0 additions & 1 deletion templates/footer/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* @since 2.0
* @package Prime
*/

?>
<footer id="colophon" <?php BoldGrid::add_class( 'footer', [ 'site-footer' ] ); ?> role="contentinfo" <?php BoldGrid_Framework_Schema::footer( true ); ?>>
<?php do_action( 'boldgrid_footer_top' ); ?>
Expand Down
2 changes: 0 additions & 2 deletions templates/header/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
*
* @package Prime
*/

?>

<header id="masthead" <?php BoldGrid::add_class( 'header', [ 'header' ] ); ?> role="banner" <?php BoldGrid_Framework_Schema::header( true ); ?>>
<div class="custom-header-media">
<?php the_custom_header_markup(); ?>
Expand Down
3 changes: 1 addition & 2 deletions templates/page-header-archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
/**
* Archive Page Entry Header Template
*
* This file contains the markup for the archive page's
* entry header.
* This file contains the markup for the archive page's entry header.
*
* @package Prime
*/
Expand Down
9 changes: 9 additions & 0 deletions templates/page-header-blog.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Blog Page Entry Header Template
*
* This file contains the markup for the blog page's entry header.
*
* @package Prime
*/
?>
<div <?php BoldGrid::add_class( 'page_header_wrapper', [ 'page-header-wrapper', get_theme_mod( 'bgtfw_global_title_background_container' ) ] ); ?>>
<header <?php BoldGrid::add_class( 'blog_page_title', [ 'page-header', has_post_thumbnail( get_option( 'page_for_posts', true ) ) ? 'has-featured-image-header' : '' ] ) ?> <?php bgtfw_featured_img_bg( get_option( 'page_for_posts', true ), true ); ?>>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header', get_theme_mod( 'bgtfw_global_title_content_container' ) ] ); ?>>
Expand Down
25 changes: 25 additions & 0 deletions templates/page-headers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
/**
* Page Headers Template
*
* This file gets the template part for the page header/title to display.
*
* @package Prime
*/
if ( is_archive() ) {
get_template_part( 'templates/page-header', 'archive' );
}

if ( ! is_front_page() && is_home() ) {
get_template_part( 'templates/page-header', 'blog' );
}

while ( have_posts() ) : the_post();
if ( is_page() ) {
get_template_part( 'templates/entry-header-page' );
}

if ( is_single() ) {
get_template_part( 'templates/entry-header-single', get_post_format() );
}
endwhile;
9 changes: 9 additions & 0 deletions templates/post-list-header-above.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Post List Header Above Template
*
* This file contains the markup for the post list with feat img above the header information.
*
* @package Prime
*/
?>
<header <?php BoldGrid::add_class( 'entry_header', [ 'entry-header', 'above' ] ); ?>>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?> <?php is_single() ? : bgtfw_featured_img_bg( $post->ID, true ); ?>></div>
<div>
Expand Down
9 changes: 9 additions & 0 deletions templates/post-list-header-background.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Post List Header Background Template
*
* This file contains the markup for the post list with feat img as a background image for header.
*
* @package Prime
*/
?>
<header <?php BoldGrid::add_class( 'entry_header', [ 'entry-header' ] ); ?> <?php is_single() ? : bgtfw_featured_img_bg( $post->ID, true ); ?>>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?>>
<?php if ( is_single() || is_page() ) : ?>
Expand Down
9 changes: 9 additions & 0 deletions templates/post-list-header-below.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Post List Header Below Template
*
* This file contains the markup for the post list with feat img below header information.
*
* @package Prime
*/
?>
<header <?php BoldGrid::add_class( 'entry_header', [ 'entry-header', 'below' ] ); ?>>
<div>
<?php the_title( sprintf( '<p class="entry-title ' . get_theme_mod( 'bgtfw_blog_post_header_title_size' ) . '"><a ' . BoldGrid::add_class( 'blog_page_post_title', [ 'link' ], false ) . ' href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></p>' ); ?>
Expand Down
9 changes: 9 additions & 0 deletions templates/post-list-header-content.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Post List Header Content Template
*
* This file contains the markup for the post list with feat img in post content.
*
* @package Prime
*/
?>
<header <?php BoldGrid::add_class( 'entry_header', [ 'entry-header' ] ); ?>>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?>>
<?php the_title( sprintf( '<p class="entry-title ' . get_theme_mod( 'bgtfw_blog_post_header_title_size' ) . '"><a ' . BoldGrid::add_class( 'blog_page_post_title', [ 'link' ], false ) . ' href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></p>' ); ?>
Expand Down
9 changes: 9 additions & 0 deletions templates/post-list-header.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<?php
/**
* Post List Header
*
* This file contains the markup for the post list header.
*
* @package Prime
*/
?>
<header <?php BoldGrid::add_class( 'entry_header', [ 'entry-header' ] ); ?> <?php bgtfw_featured_img_bg( $post->ID ); ?>>
<div <?php BoldGrid::add_class( 'featured_image', [ 'featured-imgage-header' ] ); ?>>
<?php the_title( sprintf( '<p class="entry-title ' . get_theme_mod( 'bgtfw_blog_post_header_title_size' ) . '"><a ' . BoldGrid::add_class( 'blog_page_post_title', [ 'link' ], false ) . ' href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></p>' ); ?>
Expand Down
1 change: 0 additions & 1 deletion templates/recent-entries.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* @package Prime
*/
?>

<?php
$recent_posts = wp_get_recent_posts( array( 'numberposts' => '10', 'post_status' => 'publish' ) );
$pages = get_pages( array( 'sort_column' => 'menu_order' ) );
Expand Down
1 change: 0 additions & 1 deletion templates/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
*
* @package Prime
*/

bgtfw_widget( 'primary-sidebar', true );

0 comments on commit 323bd14

Please sign in to comment.