adding styles to the archive pages
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 29 Aug 2018 12:55:13 +0000 (08:55 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 29 Aug 2018 12:55:13 +0000 (08:55 -0400)
archive.php
functions.php
parts/glm-client-info.php
style.css

index b56e12c..6dc6673 100644 (file)
@@ -6,9 +6,22 @@
  *
  * @package accesspress_parallax
  */
-
+global $post;
+$pt = $post->post_type;
+$testimonial_page = get_post(106); 
 get_header(); ?>
+<?php glm_get_header($testimonial_page->ID); ?>
 <div class="mid-content clearfix">
+    <?php if( $pt == 'testimonial'){ ?>
+        <div class="page-content"> 
+            <?php
+                $testimonial_page = get_post(106); 
+                // echo apply_filters('the_content', $testimonial_page->post_content ); 
+                $content = strip_shortcodes( $testimonial_page->post_content);
+                echo apply_filters('the_content', $content );
+            ?>
+        </div>
+    <?php } ?>
        <section id="primary" class="content-area">
                <main id="main" class="site-main" role="main">
 
@@ -37,7 +50,8 @@ get_header(); ?>
 
                </main><!-- #main -->
        </section><!-- #primary -->
-
-<?php get_sidebar(); ?>
+<?php if( !$pt == 'testimonial'){ ?>
+    <?php get_sidebar(); ?>
+<?php } ?>
 </div>
 <?php get_footer();
index 1ea3d07..cc35150 100644 (file)
@@ -270,12 +270,12 @@ add_action("wp_ajax_get_my_option", "accesspress_parallax_get_my_option");
 define( 'OPTIONS_FRAMEWORK_DIRECTORY', get_template_directory_uri() . '/inc/options-framework/' );
 
 /* Header for posts*/
-function glm_get_header() {
+function glm_get_header($id = false) {
     echo '<div ';
-
-    if (has_post_thumbnail()) {
+    
+    if (has_post_thumbnail() || $id) {
         echo 'class="interior-featured"';
-            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id(), "full");
+            $image_data = wp_get_attachment_image_src(get_post_thumbnail_id($id), "full");
             echo ' style="background-image: url('.$image_data[0].');height:100%;padding-bottom:27%;background-position:center center;background-size: 100%;background-repeat:no-repeat; "';
     } else {
             echo ' style="background:transparent;height:100%;padding-bottom:0;background-position:center center;background-size: 100%;background-repeat:no-repeat;"';
index 99121cd..ca6025b 100644 (file)
@@ -39,7 +39,7 @@
             <?php if (glm_get_clientinfo_option('address')):?>
                 <span class="address_1_street"><?php echo glm_get_clientinfo_option('address2');?></span><br>
                 <span class="pipe"> &nbsp;</span>
-                <span class="address_1_region"><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?> <span class="pipe"> </span> <?php echo glm_get_clientinfo_option('zip');?></span> <br>
+                <span class="address_1_region"><?php echo glm_get_clientinfo_option('city2');?>, <?php echo glm_get_clientinfo_option('state2');?> <span class="pipe"> </span> <?php echo glm_get_clientinfo_option('zip2');?></span> <br>
             <?php endif;?>
             <?php if (glm_get_clientinfo_option('fax2')) :?>
                 <span><?php echo glm_get_clientinfo_option('fax2');?></span> <span class="pipe"> &nbsp;</span>
index ce2384c..ed2c5e1 100644 (file)
--- a/style.css
+++ b/style.css
@@ -805,46 +805,8 @@ Posts and pages
     clear: both;
     margin: 0 0 20px;
 }
-@media (min-width: 1000px){
-    .archive #content > .mid-content, .single #content > .mid-content{
-        margin-top: 100px;
-    }
-}
-@media (max-width: 1000px) and (min-width: 768px){
-    .archive #content > .mid-content, .single #content > .mid-content{
-        margin-top: 50px;
-    }
-}
-.post-type-archive-testimonial .entry-content{
-    padding: 10px 20px;
-    background-color: rgba(33,33,33,.1);
-    margin: 0;
-}
-.post-type-archive-testimonial .hentry {
-    margin-bottom: 0px;
-    padding-bottom: 5px;
-    /* padding-left: 0px; */
-    /* border-bottom: 1px solid #AE8B5F; */
-}
-.archive article.testimonial .entry-header .entry-title{
-    margin-left: 0px;
-    margin-bottom: 0px;
-    text-align: center;
-    background-color: #004037;
-    padding: 5px 0;
-}
-.single article.testimonial .byline{
-    display: none;
-}
-.single article.testimonial .entry-header .entry-title{
-    background-color: #004037;
-    color: white;
-    padding: 11px;
-    margin-left: 60px;
-}
-article.testimonial .entry-header .entry-title a{
-    color: white;
-}
+
+
 .single article.testimonial.hentry{
     padding-top: 0;
 }
@@ -2812,7 +2774,8 @@ Responsive grid for pages
     font-weight: bold;
 }
 
-.parallax-section:nth-child(4) .overlay{
+body #page .parallax-section:nth-child(3) .overlay{
+    background: rgba(0,0,0, 0.7);
     /* border-top: 4px solid #320701;
     border-bottom: 4px solid #320701; */
     /* border-top: 3px solid #F28B59;
@@ -2820,6 +2783,16 @@ Responsive grid for pages
     /* background: rgba(0,0,0, .7) !important; */
    /* margin-top: 30px; */
 }
+body #page .parallax-section:nth-child(3) .mid-content .portfolio-image{
+    border: 2px solid white;
+}
+body #page .parallax-section:nth-child(3) .mid-content > h2{
+    background-color: rgba(0,0,0, .4);
+    padding: 5px 0;
+    max-width: 860px;
+    margin: 0 auto;
+    border-radius: 5px;
+}
 .parallax-section:nth-child(3){
     /* border-bottom: 4px solid #004038; */ */
    /* margin-top: 30px; */
@@ -2904,10 +2877,13 @@ body footer#colophon .bottom-footer .weather-atlas-wrapper .wi-weather-32{
 html body.home #content .parallax-section:nth-child(4) .mid-content >h2 {
     display: block;
     margin-bottom: 5px;
+
+    /* max-width: 300px; */
 }
 html body.home #content .parallax-section:nth-child(4) .mid-content > .parallax-content > .page-content > .testimonial_rotator_wrap{
     margin-top: 0px;
-    margin-bottom: 3px;
+    margin-bottom: 5px;
+    padding-top: 0px;
 }
 html body.home #content .parallax-section:nth-child(4) .mid-content{
     padding-bottom: 0px;
@@ -2934,3 +2910,79 @@ p, a, li, div{
 .menu-item a{
     font-size: 20px;
 }
+@media (min-width: 1000px){
+    .archive #content > .mid-content, .single #content > .mid-content{
+        margin-top: 50px;
+    }
+}
+@media (max-width: 1000px) and (min-width: 768px){
+    .archive #content > .mid-content, .single #content > .mid-content{
+        margin-top: 50px;
+    }
+}
+.post-type-archive-testimonial #primary.content-area{
+    width: 100%;
+}
+.post-type-archive-testimonial .entry-content{
+    padding: 10px 5px;
+    /* background-color: rgba(33,33,33,.1); */
+    margin: 0;
+}
+.post-type-archive-testimonial .hentry {
+    margin-bottom: 0px;
+    padding-bottom: 5px;
+    /* padding-left: 0px; */
+    /* border-bottom: 1px solid #AE8B5F; */
+}
+.page-content{
+    padding: 5px 20px;
+}
+.archive article.testimonial .entry-header .entry-title{
+    margin-left: 0px;
+    margin-bottom: 0px;
+    /* background-color: #004037; */
+    color: #004037;
+    padding: 5px 0;
+    border-bottom: 1px solid #AE8B5F;
+    display: inline-block;
+}
+@media(min-width: 1000px){
+    .post-type-archive-testimonial .interior-featured{
+        top: 50px;
+    }
+}
+@media(max-width: 1000px) and (min-width: 768px){
+    .post-type-archive-testimonial .interior-featured{
+        top: 35px;
+    }
+}
+@media(max-width: 768px){
+    .post-type-archive-testimonial .interior-featured{
+        top: 20px;
+    }
+    .post-type-archive-testimonial .no-featured{
+        padding: 0;
+    }
+}
+article.testimonial .entry-header .entry-title a{
+    color: #004037;
+    font-size: 19px;
+}
+.single article.testimonial .byline{
+    display: none;
+}
+.single article.testimonial .entry-header .entry-title{
+    background-color: #004037;
+    color: white;
+    padding: 11px;
+    margin-left: 60px;
+}
+.site-content{
+    min-height: 35vw;
+}
+body.home #content .parallax-section .testimonial_rotator_slide_title{
+    font-size: 14px;
+    display: block;
+    padding: 0;
+    margin-bottom: 3px !important;
+}
\ No newline at end of file