}
-
-/* Header for posts*/
function glm_get_header() {
echo '<div';
+ if ( get_post_type( get_the_ID() ) == 'page' && has_post_thumbnail() ) {
+ $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+ echo ' id="feature-image" style="background-image: url('.$image_data[0].');height:100%;padding:0;background-position:top center;background-size:cover;background-repeat:no-repeat;min-height: 270px;max-height: 630px;"';
- if (has_post_thumbnail()) {
- $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
- echo ' style="background-image: url('.$image_data[0].');height:350px;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat; "';
} else {
- echo ' style="background-image: url('.get_template_directory_uri().'/assets/government.jpg);background-size: 100%;background-repeat:no-repeat;"';
- echo ' class="no-featured"';
+ echo ' id="feature-image" style="background-image: url('.get_template_directory_uri().'/assets/government.jpg);height:100%;padding:0;background-position:top center;background-size:cover;background-repeat:no-repeat;min-height: 270px;max-height: 630px;"';
}
echo '>';
echo '</div>';
-// echo '<div class="row">';
-// echo '<div class="small-12 columns">';
-// echo '</div>';
-// echo '</div>';
+ echo '<div class="row">';
+ echo '<div class="small-12 columns">';
+ echo '</div>';
+ echo '</div>';
}
+///* Header for posts*/
+//function glm_get_header() {
+// echo '<div';
+//
+// if (has_post_thumbnail()) {
+// $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+// echo ' style="background-image: url('.$image_data[0].');height:350px;padding:0;padding-bottom:20%;background-position:center center;background-size: 100%;background-repeat:no-repeat; "';
+// } else {
+// echo ' style="background-image: url('.get_template_directory_uri().'/assets/government.jpg);background-size: 100%;background-repeat:no-repeat;"';
+// echo ' class="no-featured"';
+// }
+// echo '>';
+// echo '</div>';
+//// echo '<div class="row">';
+//// echo '<div class="small-12 columns">';
+//// echo '</div>';
+//// echo '</div>';
+//}
// // The code below is useful when you want the image to resize to
// if (has_post_thumbnail()) {
<?php get_header(); ?>
+<header>
+ <?php get_template_part('parts/head-image');?>
+</header>
<main class="blog-home">
-<!-- <article <?php // post_class() ?> id="interior-featured">
- <?php // GLM_get_header(); ?>
- </article> -->
+<!--
+ <article <?php //post_class() ?> id="interior-featured">
+ <?php // glm_get_header(); ?>
+ </article>
+-->
<div class="row">
+ <?php get_template_part('parts/bread-crumbs'); ?>
<div id="blog-posts-over" class="small-12 medium-9 columns">
+ <h1> County News</h1>
<?php if(have_posts()) : while(have_posts()): the_post();?>
<div class="row content blog-posts-container">
<!-- <div class="small-11 small-centered columns">-->