Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * @package WordPress
- * @subpackage ColegioYapeyu
- */
- get_header(); ?>
- <div id="main" class="wrap">
- <!-- DESTACADOS -->
- <div id="featured">
- <div id="featuredSlider">
- <ul>
- <?php
- if(query_posts('cat=100&order=DESC')){
- query_posts('cat=100&order=DESC');
- } else {
- query_posts(array('posts_per_page' => 1, 'order' => 'DESC', 'category__and' => array(1,3,4,102)));
- }
- if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
- <li id="post-<?php the_ID(); ?>">
- <div class="postImage">
- <?php
- $customField = get_post_custom_values('YouTubeId');
- if (isset($customField[0])) {
- global $wp_query;
- $postid = $wp_query->post->ID;
- 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>';
- }
- else {
- echo get_post_image('medium');
- }
- ?>
- </div>
- <div class="postInfo">
- <div class="postTitle">
- <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(', '); } ?> – <?php the_time('j F, Y'); ?></p>
- <h2><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
- </div>
- <div class="postContent">
- <p><?php echo new_excerpt(20); ?></p>
- <p class="moreLink"><a href="<?php the_permalink(); ?>"><strong>Continuar leyendo »</strong></a></p>
- </div>
- </div>
- </li>
- <?php endwhile; ?>
- <?php else : ?>
- <li><strong>No hay noticias destacadas!</strong></li>
- <?php endif; ?>
- <?php wp_reset_query();?>
- </ul>
- <div id="featuredNav">
- <p>
- <a href="" id="featuredPrev" class="btn prevBtn" title="Noticia anterior"><span>« Anterior</span></a>
- <a href="" id="featuredStop" class="btn" title="Detener"><span>||</span></a>
- <a href="" id="featuredPlay" class="btn" title="Reproducir"><span>»</span></a>
- <a href="" id="featuredNext" class="btn" title="Noticia siguiente"><span>Siguiente »</span></a>
- </p>
- </div>
- </div>
- </div>
- <!-- CALENDARIO -->
- <div id="calendar">
- <?php if(function_exists('simplecal_calendar')) { simplecal_calendar(); } ?>
- <?php if(function_exists('simplecal_next_events')) { simplecal_next_events(3); } ?>
- </div>
- <!-- ULTIMAS NOVEDADES -->
- <div id="lastNews">
- <h2 class="sectionTitle">Últimas Novedades</h2>
- <ul>
- <?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(); ?>
- <?php $ids[]= $post->ID; ?>
- <li id="lastNews-<?php the_ID(); ?>">
- <div class="postImage">
- <a href="<?php the_permalink(); ?>">
- <?php
- $customField = get_post_custom_values('YouTubeId');
- if (isset($customField[0])) {
- global $wp_query;
- $postid = $wp_query->post->ID;
- echo '<img src="http://img.youtube.com/vi/' . get_post_meta($postid, 'YouTubeId', true) . '/default.jpg" alt="" />';
- }
- else {
- echo get_post_image('thumbnail');
- }
- ?>
- </a>
- </div>
- <div class="postInfo">
- <div class="postTitle">
- <h3><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','…',true, '50'); ?></a></h3>
- <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(', '); } ?> – <?php the_time('j F, Y'); ?></p>
- </div>
- <div class="postContent">
- <p><?php echo new_excerpt(15); ?></p>
- <p class="moreLink"><a href="<?php the_permalink(); ?>"><strong>Continuar leyendo »</strong></a></p>
- </div>
- </div>
- </li>
- <?php endwhile; else: ?>
- <li><strong>No hay noticias!</strong></li>
- <?php endif; ?>
- <?php wp_reset_query();?>
- </ul>
- </div>
- <!-- NOVEDADES SEGUN LA ESCOLARIDAD -->
- <div id="gradeNews">
- <ul>
- <li class="gradeBox">
- <h2><a href="<?php echo get_option('home'); ?>/category/jardin">Jardín</a></h2>
- <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu-Jardin"> title="Subscribirse al RSS de Jardin">RSS de Jardin</a>
- <ul>
- <!-- NOVEDADED JARDIN -->
- <?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)) { ?>
- <li id="gradeNews-<?php the_ID(); ?>">
- <div class="postImage">
- <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
- </div>
- <div class="postInfo">
- <div class="postTitle">
- <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','…',true, '35'); ?></a></h4>
- <p class="postMeta"><?php the_time('j F, Y'); ?></p>
- </div>
- </div>
- </li>
- <?php } endwhile; else: ?>
- <li><em>No hay noticias en Jardin!</em></li>
- <?php endif; ?>
- <?php wp_reset_query();?>
- </ul>
- </li>
- <li class="gradeBox">
- <h2><a href="<?php echo get_option('home'); ?>/category/primaria">Primaria</a></h2>
- <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu-Primaria"> title="Subscribirse al RSS de Primaria">RSS de Primaria</a>
- <ul>
- <!-- NOVEDADES PRIMARIA -->
- <?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)) { ?>
- <li id="gradeNews-<?php the_ID(); ?>">
- <div class="postImage">
- <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
- </div>
- <div class="postInfo">
- <div class="postTitle">
- <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','…',true, '35'); ?></a></h4>
- <p class="postMeta"><?php the_time('j F, Y'); ?></p>
- </div>
- </div>
- </li>
- <?php } endwhile; else: ?>
- <li><em>No hay noticias en Primaria!</em></li>
- <?php endif; ?>
- <?php wp_reset_query();?>
- </ul>
- </li>
- <li class="gradeBox">
- <h2><a href="<?php echo get_option('home'); ?>/category/secundaria">Secundaria</a></h2>
- <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu-Secundaria"> title="Subscribirse al RSS de Secundaria">RSS de Secundaria</a>
- <ul>
- <!-- NOVEDADES SECUNDARIA -->
- <?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)) { ?>
- <li id="gradeNews-<?php the_ID(); ?>">
- <div class="postImage">
- <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
- </div>
- <div class="postInfo">
- <div class="postTitle">
- <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','…',true, '35'); ?></a></h4>
- <p class="postMeta"><?php the_time('j F, Y'); ?></p>
- </div>
- </div>
- </li>
- <?php } endwhile; else: ?>
- <li><em>No hay noticias en Secundaria!</em></li>
- <?php endif; ?>
- <?php wp_reset_query();?>
- </ul>
- </li>
- <li class="gradeBox">
- <h2><a href="<?php echo get_option('home'); ?>/category/generales">Generales</a></h2>
- <a class="categoryRss" href="http://feeds.feedburner.com/ColegioYapeyu" title="Subscribirse al RSS de Noticias Generales">RSS de Noticias Generales</a>
- <ul>
- <!-- NOVEDADES GENERALES -->
- <?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)) { ?>
- <li id="gradeNews-<?php the_ID(); ?>">
- <div class="postImage">
- <a href="<?php the_permalink(); ?>"><?php echo get_post_image('thumbnail','','default-thumb'); ?></a>
- </div>
- <div class="postInfo">
- <div class="postTitle">
- <h4><a href="<?php the_permalink(); ?>" title="Link permanente a <?php the_title_attribute(); ?>"><?php short_title('','…',true, '35'); ?></a></h4>
- <p class="postMeta"><?php the_time('j F, Y'); ?></p>
- </div>
- </div>
- </li>
- <?php } endwhile; else: ?>
- <li><em>No hay noticias en Generales!</em></li>
- <?php endif; ?>
- <?php wp_reset_query();?>
- </ul>
- </li>
- </ul>
- </div>
- </div>
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement