Advertisement
Jon1DC

front-page.php

Jun 5th, 2014
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.46 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3.     <div id="purpose">
  4.         <p>
  5.             <span>We're dedicated</span>
  6.             <span>to empowering</span>
  7.             <span>students to</span>
  8.             <strong>stay in school</strong>
  9.             <span>and achieve</span>
  10.             <span>in life.</span>
  11.         </p>
  12.     </div>
  13.  
  14.     <div id="intro">
  15.         <?php if ( function_exists( 'pods') ) : ?>
  16.             <ol>
  17.                 <?php
  18.                 $pods = pods( 'homepage_slide   ', array(
  19.                     'where'   => "t.published = 1",
  20.                     'orderby' => 't.sort_order ASC',
  21.                     'limit'   => 4,
  22.                 ) );
  23.                 $slide_counter   = 0;
  24.                 while ( $pods->fetch() ) :
  25.                     $name      = $pods->display( 'name' );
  26.                     $link      = $pods->display( 'link' );
  27.                     $teaser    = $pods->display( 'teaser' );
  28.                     $video_id  = $pods->display( 'video_id' );
  29.                     $image     = wp_get_attachment_image_src( $pods->display( 'image.ID' ), 'slide' );
  30.  
  31.                     $a_open = $a_close = '';
  32.                     if ($link != '') :
  33.                         $a_open = '<a href="' . $link . '">';
  34.                         $a_close = '</a>';
  35.                     endif;
  36.                     ?>
  37.                     <li id="slide-<?php echo ++$slide_counter; ?>"<?php if ( 1 == $slide_counter ) echo ' class="current"'; ?>>
  38.                         <?php if ( '' != $video_id ) : ?>
  39.                             <div id="video<?php echo $slide_counter; ?>" class="video slide" data-video="<?php echo $video_id; ?>"></div>
  40.                         <?php else : ?>
  41.                             <div class="slide"><?php echo $a_open; ?><img src="<?php echo $image[0]; ?>" alt="<?php echo $name; ?>" /><?php echo $a_close; ?></div>
  42.                         <?php endif; ?>
  43.                         <div class="excerpt"><?php echo $a_open; ?>
  44.                             <?php echo $teaser; ?>
  45.                             <p class="more">More</p>
  46.                         <?php echo $a_close; ?></div>
  47.                     </li>
  48.                     <?php
  49.                 endwhile;
  50.                 ?>
  51.             </ol>
  52.             <div id="key" class="cols-<?php echo $slide_counter; ?>">
  53.                 <?php for ( $i = 1; $i <= $slide_counter; $i++ ) : ?>
  54.                     <a href="#slide-<?php echo $i; ?>"<?php if ($i == 1) echo ' class="current"'; ?>><b><?php echo $i; ?></b></a>
  55.                 <?php endfor; ?>
  56.             </div>
  57.         <?php endif; ?>
  58.     </div>
  59.  
  60.     <div id="take-action">
  61.         <h3>What <strong>you</strong> can do</h3>
  62.         <ol>
  63.             <li class="learn">
  64.                 <h4>Learn</h4>
  65.                 <p>Learn about the crisis and what we are doing to end it.</p>
  66.             </li>
  67.             <li class="volunteer">
  68.                 <h4>Volunteer</h4>
  69.                 <p>

Volunteer to make a difference in the life of a child.</p>
  70.             </li>
  71.             <li class="advocate">
  72.                 <h4>Advocate</h4>
  73.                 <p>Advocate for education and better resources for PA youth.</p>
  74.             </li>
  75.             <li class="give">
  76.                 <h4>Give</h4>
  77.                 <p>Give to change the future of children and Pennsylvania.</p>
  78.             </li>
  79.         </ol>
  80.     </div>
  81.  
  82.     <div id="content">
  83.  
  84.         <div id="five-basics">
  85.             <h3>The 5 Basics</h3>
  86.             <p>Communities In Schools believes every child needs and deserves these five essential things:</p>
  87.             <ol>
  88.                 <li id="basic-1">A one-on-one caring relationship with an adult.</li>
  89.                 <li id="basic-2">A safe place to learn and grow.</li>
  90.                 <li id="basic-3">A healthy start and a healthy future.</li>
  91.                 <li id="basic-4">A marketable skill to use upon graduation.</li>
  92.                 <li id="basic-5">A chance to give back to peers and community.</li>
  93.             </ol>
  94.         </div>
  95.  
  96.         <div id="primary">
  97.  
  98.             <div id="news">
  99.                 <h2>Recent News</h2>
  100.                 <?php
  101.                 $news = new WP_Query( array(
  102.                     'posts_per_page' => 4,
  103.                 ) );
  104.                 if ( $news->have_posts() ) : ?>
  105.                     <ul>
  106.                         <?php while ( $news->have_posts() ) : $news->the_post(); ?>
  107.                             <li><a href="<?php the_permalink(); ?>#<?php echo $i; ?>">
  108.                                 <?php
  109.                                 if ( has_post_thumbnail() ) :
  110.                                     echo get_the_post_thumbnail( $post->ID, 'thumbnail', array( 'alt' => get_the_title(), 'title' => '', 'width' => 80, 'height' => 80 ) );
  111.                                 else:
  112.                                     ?><img src="<?php echo get_template_directory_uri(); ?>/images/no-image-thumbnail.png" width="80" height="80" alt=""><?php
  113.                                 endif;
  114.                                 ?>
  115.                                 <h3><?php echo strip_tags( get_the_title() ); ?></h3>
  116.                                 <p class="meta"><?php cispa_theme_posted_on(); ?></p>
  117.                             </a></li>
  118.                         <?php endwhile; ?>
  119.                     </ul>
  120.                 <?php endif; ?>
  121.                 <?php wp_reset_postdata(); // prevent weirdness ?>
  122.             </div>
  123.  
  124.             <aside id="twitter">
  125.                 <?php if ( function_exists( 'get_twitterlitter') ) : ?>
  126.                     <?php
  127.                     $twitter = get_twitterlitter( array( 'limit' => 1 ) );
  128.                     if ( is_array( $twitter->tweets ) ) : ?>
  129.                         <?php foreach($twitter->tweets as $tweet) : ?>
  130.                             <p class="tweet"><?php echo $tweet->content; ?></p>
  131.                             <p class="meta">
  132.                                 <a href="<?php echo $twitter->user_link ?>" class="user" rel="external">@<?php echo $twitter->user_name ?></a>
  133.                                 posted <?php echo $tweet->when; ?>
  134.                                 <span class="sep">|</span>
  135.                                 <a href="<?php echo $twitter->user_link ?>" class="follow" rel="external">follow</a>
  136.                             </p>
  137.                         <?php endforeach; ?>
  138.                     <?php else : ?>
  139.                         <p>Sorry, no tweets at the moment.</p>
  140.                     <?php endif; ?>
  141.                 <?php endif; ?>
  142.             </aside>
  143.  
  144.             <form id="subscribe" action="http://visitor.r20.constantcontact.com/d.jsp?llr=qs44bzbab&p=oi&m=1101426327120&sit=wolwp5ybb&f=d63e9ae1-8db6-47f0-aecd-f45474a28a0c" target="_blank" method="post">
  145.                 <h3><strong>Stay Informed!</strong> Join our Mailing List:</h3>
  146.                 <input type="text" name="ea">
  147.                 <input type="submit" value="Submit">
  148.                 <input type="hidden" name="llr" value="x7hzg8cab">
  149.                 <input type="hidden" name="m" value="1102572199831">
  150.                 <input type="hidden" name="p" value="oi">
  151.             </form>
  152.  
  153.         </div><!-- #primary -->
  154.  
  155.         <?php get_sidebar(); ?>
  156.         <?php include( get_template_directory() . '/inc/share.php' ); ?>
  157.  
  158.     </div><!-- #content -->
  159.  
  160. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement