Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <?php
  2. /**
  3.  * @package WordPress
  4.  * @subpackage ColegioYapeyu
  5.  */
  6.  
  7. get_header(); ?>
  8.  
  9. <div id="main" class="wrap">
  10.  
  11. <!-- DESTACADOS -->
  12. <div id="featured">
  13.     <div id="featuredSlider">
  14.         <ul>
  15.             <?php
  16.            
  17.             if(query_posts('cat=100&order=DESC')){
  18.                 query_posts('cat=100&order=DESC');
  19.             } else {
  20.                 query_posts(array('posts_per_page' => 1, 'order' => 'DESC', 'category__and' => array(1,3,4,102)));
  21.             }
  22.            
  23.              if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>     
  24.             <li id="post-<?php the_ID(); ?>">
  25.                 <div class="postImage">
  26.                     <?php
  27.                      $customField = get_post_custom_values('YouTubeId');
  28.                      if (isset($customField[0])) {
  29.                         global $wp_query;
  30.                         $postid = $wp_query->post->ID;
  31.                         echo '<object type="application/x-shockwave-flash" style="width:380px; height:300px;" data="http://www.youtube.com/v/' . get_post_meta($post->ID, "YouTubeId", true) . '"><param name="movie" value="http://www.youtube.com/v/' . get_post_meta($post->ID, "YouTubeId", true) . '"></param></object>';
  32.                      }
  33.                      else {
  34.                         echo get_post_image('medium');
  35.                      }
  36.                     ?>
  37.                 </div>
  38.                 <div class="postInfo">
  39.                     <div class="postTitle">
  40.                         <p class="postMeta"><?php if ( count( get_the_category() ) > 2 ) { echo '<a href="http://www.colegioyapeyu.edu.ar/category/destacadas">Destacadas</a>, <a href="http://www.colegioyapeyu.edu.ar/category/generales">Generales</a>'; } else { the_category(', '); } ?> &ndash; <?php the_time('j F, Y'); ?></p>
  41.                         <h2><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  42.                     </div>
  43.                     <div class="postContent">
  44.                         <p><?php echo new_excerpt(20); ?></p>
  45.                         <p class="moreLink"><a href="<?php the_permalink(); ?>"><strong>Continuar leyendo &raquo;</strong></a></p>
  46.                     </div>
  47.                 </div>
  48.             </li>
  49.            
  50.             <?php endwhile; ?> 
  51.             <?php else : ?>
  52.    
  53.             <li><strong>No hay noticias destacadas!</strong></li>
  54.            
  55.             <?php endif; ?>
  56.             <?php wp_reset_query();?>
  57.        
  58.         </ul>
  59.        
  60.         <div id="featuredNav">
  61.             <p>
  62.                 <a href="" id="featuredPrev" class="btn prevBtn" title="Noticia anterior"><span>&laquo; Anterior</span></a>
  63.                 <a href="" id="featuredStop" class="btn" title="Detener"><span>||</span></a>
  64.                 <a href="" id="featuredPlay" class="btn" title="Reproducir"><span>&raquo;</span></a>
  65.                 <a href="" id="featuredNext" class="btn" title="Noticia siguiente"><span>Siguiente &raquo;</span></a>
  66.             </p>
  67.         </div>
  68.     </div>
  69.  
  70. </div>
  71.  
  72. <!-- CALENDARIO -->
  73. <div id="calendar">
  74.     <?php if(function_exists('simplecal_calendar')) { simplecal_calendar(); } ?>
  75.     <?php if(function_exists('simplecal_next_events')) { simplecal_next_events(3); } ?>
  76. </div>
  77.  
  78. <!-- ULTIMAS NOVEDADES -->
  79. <div id="lastNews">
  80.     <h2 class="sectionTitle">&Uacute;ltimas Novedades</h2>
  81.     <ul>   
  82.         <?php $ids = array(); query_posts('cat=-100,-85,-95,-94,-110,-109&order=DESC&posts_per_page=4'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
  83.         <?php $ids[]= $post->ID; ?>
  84.         <li id="lastNews-<?php the_ID(); ?>">
  85.             <div class="postImage">
  86.                 <a href="<?php the_permalink(); ?>">
  87.                     <?php
  88.                      $customField = get_post_custom_values('YouTubeId');
  89.                      if (isset($customField[0])) {
  90.                         global $wp_query;
  91.                         $postid = $wp_query->post->ID;
  92.                         echo '<img src="http://img.youtube.com/vi/' . get_post_meta($postid, 'YouTubeId', true) . '/default.jpg" alt="" />';
  93.                      }
  94.                      else {
  95.                         echo get_post_image('thumbnail');
  96.                      }
  97.                     ?>
  98.                 </a>
  99.             </div>
  100.             <div class="postInfo">
  101.                 <div class="postTitle">    
  102.                     <h3><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','&hellip;',true, '50'); ?></a></h3>
  103.                     <p class="postMeta"><?php if ( count( get_the_category() ) > 1 ) { echo '<a href="http://www.colegioyapeyu.edu.ar/category/generales">Generales</a>'; } else { the_category(', '); } ?> &ndash; <?php the_time('j F, Y'); ?></p>
  104.                 </div>
  105.                 <div class="postContent">
  106.                     <p><?php echo new_excerpt(15); ?></p>
  107.                     <p class="moreLink"><a href="<?php the_permalink(); ?>"><strong>Continuar leyendo &raquo;</strong></a></p>
  108.                 </div>
  109.             </div>
  110.         </li>      
  111.         <?php endwhile; else: ?>       
  112.         <li><strong>No hay noticias!</strong></li>         
  113.         <?php endif; ?>
  114.         <?php wp_reset_query();?>      
  115.     </ul>
  116. </div>
  117.  
  118. <!-- NOVEDADES SEGUN LA ESCOLARIDAD -->
  119. <div id="gradeNews">
  120.     <ul>
  121.         <li class="gradeBox">
  122.             <h2><a href="<?php echo get_option('home'); ?>/category/jardin">Jard&iacute;n</a></h2>
  123.             <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu-Jardin"> title="Subscribirse al RSS de Jardin">RSS de Jardin</a>
  124.             <ul>           
  125.                 <!-- NOVEDADED JARDIN -->
  126.                 <?php query_posts('cat=3,-1,-4,-102,-100,-111&order=DESC&posts_per_page=3'); if ( have_posts() ) : while ( have_posts() ) : the_post(); if (!in_array($post->ID, $ids)) { ?>       
  127.                 <li id="gradeNews-<?php the_ID(); ?>">
  128.                     <div class="postImage">
  129.                         <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
  130.                     </div>
  131.                     <div class="postInfo">
  132.                         <div class="postTitle">    
  133.                             <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','&hellip;',true, '35'); ?></a></h4>
  134.                             <p class="postMeta"><?php the_time('j F, Y'); ?></p>
  135.                         </div>
  136.                     </div>
  137.                 </li>      
  138.                 <?php } endwhile; else: ?>     
  139.                 <li><em>No hay noticias en Jardin!</em></li>           
  140.                 <?php endif; ?>
  141.                 <?php wp_reset_query();?>          
  142.             </ul>
  143.         </li>
  144.         <li class="gradeBox">
  145.             <h2><a href="<?php echo get_option('home'); ?>/category/primaria">Primaria</a></h2>
  146.             <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu-Primaria"> title="Subscribirse al RSS de Primaria">RSS de Primaria</a>
  147.             <ul>
  148.                 <!-- NOVEDADES PRIMARIA -->
  149.                 <?php query_posts('cat=4,-1,-3,-102,-100,-111&order=DESC&posts_per_page=3'); if ( have_posts() ) : while ( have_posts() ) : the_post();  if (!in_array($post->ID, $ids)) { ?>      
  150.                 <li id="gradeNews-<?php the_ID(); ?>">
  151.                     <div class="postImage">
  152.                         <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
  153.                     </div>
  154.                     <div class="postInfo">
  155.                         <div class="postTitle">    
  156.                             <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','&hellip;',true, '35'); ?></a></h4>
  157.                             <p class="postMeta"><?php the_time('j F, Y'); ?></p>
  158.                         </div>
  159.                     </div>
  160.                 </li>      
  161.                 <?php } endwhile; else: ?>     
  162.                 <li><em>No hay noticias en Primaria!</em></li>         
  163.                 <?php endif; ?>
  164.                 <?php wp_reset_query();?>              
  165.             </ul>
  166.         </li>
  167.         <li class="gradeBox">
  168.             <h2><a href="<?php echo get_option('home'); ?>/category/secundaria">Secundaria</a></h2>
  169.             <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu-Secundaria"> title="Subscribirse al RSS de Secundaria">RSS de Secundaria</a>
  170.             <ul>
  171.                 <!-- NOVEDADES SECUNDARIA -->
  172.                 <?php query_posts('cat=1,-3,-4,-102,-100,-111&order=DESC&posts_per_page=3'); if ( have_posts() ) : while ( have_posts() ) : the_post();  if (!in_array($post->ID, $ids)) { ?>      
  173.                 <li id="gradeNews-<?php the_ID(); ?>">
  174.                     <div class="postImage">
  175.                         <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
  176.                     </div>
  177.                     <div class="postInfo">
  178.                         <div class="postTitle">    
  179.                             <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','&hellip;',true, '35'); ?></a></h4>
  180.                             <p class="postMeta"><?php the_time('j F, Y'); ?></p>
  181.                         </div>
  182.                     </div>
  183.                 </li>      
  184.                 <?php } endwhile; else: ?>     
  185.                 <li><em>No hay noticias en Secundaria!</em></li>           
  186.                 <?php endif; ?>
  187.                 <?php wp_reset_query();?>      
  188.             </ul>
  189.         </li>
  190.         <li class="gradeBox">
  191.             <h2><a href="<?php echo get_option('home'); ?>/category/generales">Generales</a></h2>
  192.             <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu" title="Subscribirse al RSS de Noticias Generales">RSS de Noticias Generales</a>
  193.             <ul>   
  194.                 <!-- NOVEDADES GENERALES -->
  195.                 <?php query_posts('cat=102,111,-100&order=DESC&posts_per_page=3'); if ( have_posts() ) : while ( have_posts() ) : the_post();  if (!in_array($post->ID, $ids)) { ?>    
  196.                 <li id="gradeNews-<?php the_ID(); ?>">
  197.                     <div class="postImage">
  198.                         <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
  199.                     </div>
  200.                     <div class="postInfo">
  201.                         <div class="postTitle">    
  202.                             <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','&hellip;',true, '35'); ?></a></h4>
  203.                             <p class="postMeta"><?php the_time('j F, Y'); ?></p>
  204.                         </div>
  205.                     </div>
  206.                 </li>      
  207.                 <?php } endwhile; else: ?>     
  208.                 <li><em>No hay noticias en Generales!</em></li>        
  209.                 <?php endif; ?>
  210.                 <?php wp_reset_query();?>      
  211.             </ul>
  212.         </li>
  213.     </ul>
  214. </div>
  215.  
  216. </div>
  217.  
  218. <?php get_footer(); ?>