Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding support for a slideshow on the home page
  • Loading branch information
briandunnigan authored and briandunnigan committed Mar 28, 2016
1 parent c8f2853 commit 6a2067c
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 98 deletions.
16 changes: 8 additions & 8 deletions functions.php
Expand Up @@ -115,6 +115,12 @@ if ( function_exists('register_sidebar') ) {
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
));
register_sidebar(array(
'name' => 'Home - Slideshow',
'id' => 'sidebar-slideshow',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
));
register_sidebar(array(
'name' => 'Sidebar - About Us 1',
'id' => 'sidebar-about1',
Expand Down Expand Up @@ -229,14 +235,8 @@ if ( function_exists('register_sidebar') ) {
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
));
/* register_sidebar(array(
'name' => 'Home2',
'id' => 'home2',
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
)); */



}

Expand Down
98 changes: 8 additions & 90 deletions page-home.php
Expand Up @@ -26,97 +26,15 @@ if($homepageLayout == '1-3') {
<div class="row row-section-title">
<h3 class="text-serif">OUR APPROACH</h3>
</div>

<!-- <div class="row" id="row2">
<div class="span9" role="complementary">
<img src="<?php bloginfo('template_url'); ?>/img/home/triangle-corner-top-left.png" alt="white
triangle cut out" class="triangle-top-left" />
<?php $args = array('category_name' => 'home-slideshow',
'posts_per_page' => 4,
'orderby' => 'post-date');
$posts = get_posts($args);
?>
<?php if ( !empty($posts) && isset($posts[0])) : foreach( $posts as $post ) : setup_postdata($post); ?>
<?php the_post_thumbnail('large');?>
</div>
<div class="span3 home-slideshow-title" role="complementary">
<ul>
<li><a href="#"><?php the_title(); ?></a></li>
</ul>
</div>
</div>
<div class="row excerpt-home-slideshow">
<div class="span10 no-marg-left">
<?php the_excerpt(); ?>
</div>



<div class="home-slider-wrapper">
<?php ( is_active_sidebar('sidebar-slideshow') ? dynamic_sidebar('sidebar-slideshow'): '' ); ?>
</div>
<?php endforeach; ?>
<?php else: ?>
<p><?php _e('Sorry, no recent news.'); ?></p>
<?php endif; ?>
-->
<div class="row" id="row2">
<div id="tabs">
<div class="span9-customized slide-unready" role="complementary">
<img src="<?php bloginfo('template_url'); ?>/img/home/triangle-corner-top-left.png" alt="white
triangle cut out" class="triangle-top-left" />
<?php ?>
<?php
$args = array(
'category_name' => 'home-slideshow',
'posts_per_page' => 4,
'orderby' => 'post-date',
'order' => 'DESC'
);
$posts = get_posts($args);

echo '';
foreach($posts as $post){
setup_postdata($post);
echo '<div id="'.$post->post_name.'"><div class="home-excerpt-img"><a href="'.get_permalink(). '">'.get_the_post_thumbnail( $post->ID, 'large').'</div></a>
<span class="slideshow-credit">'.get_post_thumbnail_caption().'</span>
<span class="home-excerpt"><p>'.get_the_excerpt().'</p></span></div>';
}
echo '</div>';
echo '<div class="span3 home-slideshow-title" role="complementary"><ul>';
foreach($posts as $post){
setup_postdata($post);
echo '<li><a href="#'.$post->post_name.'">'.$post->post_title.'</a></li>';
}
echo '</ul></div>';

/*echo '<div class="row excerpt-home-slideshow"><div class="span10 no-marg-left">';
foreach($posts as $post){
setup_postdata($post);
echo '<div id="'.$post->post_name.'"></div>';
}
echo '</div></div>';*/
?>


<div class="span12 bird-triangle">
<img src="<?php bloginfo('template_url'); ?>/img/home/triangle-corner-bottom-right.png" alt="white triangle cut out" class="triangle-bottom-right" />
</div>
</div>
</div>
</div>


</div>
</div>

<div class="container" id="home-bottom-half-container">
Expand Down
34 changes: 34 additions & 0 deletions style.css
Expand Up @@ -2418,5 +2418,39 @@ ul.category-blog li a:nth-child(-n+2):after {
.panel-collapse ul li {
list-style:circle;
}

.home-slider-wrapper .caption-wrap {
position:relative !important;
margin-top:15px !important;
background-color:transparent !important;
opacity:1 !important;
}
.home-slider-wrapper .caption-wrap .caption {
color:#525559;
}

.home-slider-wrapper .metaslider .flexslider {
margin:0 0 20px;
}

.home-slider-wrapper .caption-wrap .caption a {
background-color: #70bbb4;
color: white;
font-size: 9px;
font-weight: 700;
padding: 2px 4px;
text-decoration: none;
text-transform:uppercase;
white-space: nowrap;
}
.home-slider-wrapper .caption-wrap .caption a:hover {
background-color:#5EA8A0;
}

.home-slider-wrapper .flex-direction-nav a {
top:43% !important;
}

/*Brian synced 3/28/16 */

/* Start Shemona Code */

0 comments on commit 6a2067c

Please sign in to comment.