adding advanced custom field data for the front page support section
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 2 May 2017 17:37:28 +0000 (13:37 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 2 May 2017 17:37:28 +0000 (13:37 -0400)
adding the_field function to the front page theme template file. Also had to fix a var
in the foreach for the blog posts template file as it was overriding the global post variable

parts/blog-feed-front.php
sections/front-page.php

index 9d24001..0a86445 100644 (file)
@@ -3,12 +3,12 @@
 <?php
 $lastposts = get_posts( $args );
     $count = 0;
-foreach($lastposts as $post) : setup_postdata($post); ?>
+foreach($lastposts as $posts) : setup_postdata($posts); ?>
     <div class="home-feed-post text-center small-12 medium-4 columns medium-text-left" data-equalizer-watch>
         <div class="row">
-            <?php if (has_post_thumbnail( $post->ID )) { ?>
+            <?php if (has_post_thumbnail( $posts->ID )) { ?>
             <div class="small-11 small-centered columns text-center home-feed-post-image">
-                <?php echo get_the_post_thumbnail($post->ID, array(190, 190), array('class' => 'blog-excerpt-img-wrap')); ?>
+                <?php echo get_the_post_thumbnail($posts->ID, array(190, 190), array('class' => 'blog-excerpt-img-wrap')); ?>
                 </div>
                 <div class="small-12 medium-12 columns home-feed-post-content">
                 <?php } else { ?>
@@ -22,4 +22,4 @@ foreach($lastposts as $post) : setup_postdata($post); ?>
     </div>
         <?php $count++; ?>
 <?php endforeach; ?>
-</div>
\ No newline at end of file
+</div>
index b3b638c..e6c58dd 100644 (file)
@@ -27,7 +27,9 @@
                                 </div>
                             </div>
                             <div class="leader">
+                      
                                 <div class="row">
+                               
                                     <div class="small-12 large-11 columns">
                                         <div class="row large-collapse">
                                             <div class="small-12 columns">
                                 </div>
                             </div>
                             <div id="alerts">
+                                
                                 <div class="row large-collapse" data-equalizer data-options="equalize_on_stack: false">
                                     <?php
                                     get_template_part('parts/glm-blocks');
                                     ?>
                                 </div>
-                            </div>                                
+                            </div>           
+                                        
                             <div class="row">
                                 <div class="small-12 columns text-center donation">
-                                    <h4>Generous supporters bring the dream to life</h4>
-                                    <p>As an independent 501(c)3 charitable organization, the Great Lakes Center for the Arts wouldn't be possible without the generosity of our supporters. We invite you to consider joining the family of dream makers who believe in the power of the arts!</p>
+                                    <?php the_field('front_content');?> 
                                     <a href="#" class="support"></a>
                                 </div>
                             </div>