View difference between Paste ID: KGnnnY1T and rWP9urQr
SHOW: | | - or go back to the newest paste.
1-
<?php 
1+
2-
/*
2+
3-
*
3+
4-
* Esta versión tiene las siguientes modificaciones:
4+
5-
* Viral y horizontal se muestran después de la 2 caja resumen1
5+
  <div id="destacadas">
6-
* Las cajas cuerpo y contenido-index sólo pueden ejecutarse una
6+
   <?php $contador = 0; ?>
7-
* vez dentro del bucle while a continuación de horizontal
7+
   <?php while ( have_posts() ) : the_post(); ?>
8-
*
8+
   <?php $contador ++; ?>
9-
*/
9+
   <?php if ($contador <= 2) { ?>
10-
?>
10+
11
    <div class="resumen1">
12
    <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'homepage-thumb' ); } ?>
13
    <span class="titulo"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
14
    <span class="desc"><?php echo excerpt(35); ?></span>
15
    </div>
16-
<div id="destacadas">
16+
    <?php if ($contador == 2) { ?></div><?php } ?>
17-
 <?php $contador = 0; ?>
17+
18-
 <?php while ( have_posts() ) : the_post(); ?>
18+
 <?php if ($contador == 2) { ?>
19-
 <?php $contador ++; ?>
19+
20-
 <?php if ($contador <= 2) { ?>
20+
21-
 <div class="resumen1">
21+
22-
 <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'homepage-thumb' ); } ?>
22+
  </div></div>
23-
 <span class="titulo"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
23+
24-
 <span class="desc"><?php echo excerpt(35); ?></span>
24+
25
    <?php if ($contador == 2) { ?>
26
  <div class="horizontal"><img src="<?php bloginfo('template_url'); ?>/images/gigas.jpg" width="220" height="90" />
27
   <script type="text/javascript"><!--
28-
  <?php if ($contador == 2) { ?>
28+
    google_ad_width = 728;
29
    google_ad_height = 90;
30
    //-->
31
    </script>
32
    <script type="text/javascript"
33
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
34
    </script>
35
  </div>
36-
  <?php if ($contador == 2) { ?>
36+
   <div id="cuerpo">
37
   <div id="contenido-index">
38
  <?php } ?>
39-
  <script type="text/javascript"><!--
39+
40-
   google_ad_width = 728;
40+
41-
   google_ad_height = 90;
41+
    <?php }
42-
   //-->
42+
    elseif ($contador > 2 && $contador < 6) { ?>
43-
   </script>
43+
44-
   <script type="text/javascript"
44+
    <div class="resumen2">
45-
   src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
45+
    <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'homepage-thumb' ); } ?>
46-
   </script>
46+
    <span class="titulo"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
47
    <span class="desc"><?php excerpt(40); ?></span>
48
    </div>
49
     
50
    <?php } else { ?>
51-
 <?php } ?>
51+
    <div class="resumen3">
52
    <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'home-thumb' ); } ?>
53-
  <div id="cuerpo">
53+
    <span class="titulo"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
54-
  <div id="contenido-index">
54+
    <span class="desc"><?php excerpt(35); ?></span>
55
    </div>
56-
 <?php if ($contador > 2 && $contador < 6) { ?>
56+
    <?php } ?>
57-
  <div class="resumen2">
57+
58-
  <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'homepage-thumb' ); } ?>
58+
59-
  <span class="titulo"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
59+
60-
  <span class="desc"><?php echo excerpt(40); ?></span>
60+
61
 </div>
62-
 <?php } ?>
62+
63
<?php get_sidebar(); ?>
64-
 <?php if ($contador > 5) { ?>
64+
65-
  <div class="resumen3">
65+
66-
  <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'home-thumb' ); } ?>
66+