View difference between Paste ID: b4PENWjj and WYCzqwt4
SHOW: | | - or go back to the newest paste.
1
<?php 
2
/*
3
*
4
* Esta versión tiene las siguientes modificaciones:
5
* contador por $contador
6
* El 5 por el 6 en el contador
7
* La publicidad se muestra después del 2 post en resumen1
8
* Las cajas cuerpo y contenido-index sólo pueden ejecutarse una
9
* vez dentro del bucle while, para eso se coloca al final de la caja horizontal
10
*
11
*/
12
?>
13
14
<?php get_header(); ?>
15-
<?php if (contador == 1) { ?>
15+
16
<div id="destacadas">
17
<?php $contador = 0; ?>
18
<?php while ( have_posts() ) : the_post(); ?>
19
<?php $contador ++; ?>
20
<?php if ($contador <= 2) { ?>
21
<div class="resumen1">
22-
<?php if (contador == 1) { ?>
22+
23
<span class="titulo"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
24
<span class="desc"><?php echo excerpt(35); ?></span>
25
</div>
26
27
</div>
28
<?php if ($contador == 1) { ?>
29
<div id="viral">
30
<script type="text/javascript" src="http://videos.goviral-content.com/playerjs-yt/movistar_12938.js?w=400&h=300&pID=60113&bgc=ffffff&cw=1453177&skinName=light&wmode=window&hideChrome=0"></script>
31
<span class="viraltext">Aprovecha las últimas novedades</span>
32
</div>
33
<?php } ?>
34
</div>
35
<?php if ($contador == 2) { ?>
36
<div class="horizontal"><img src="<?php bloginfo('template_url'); ?>/images/gigas.jpg" width="220" height="90" />
37
<script type="text/javascript"><!--
38-
elseif ($contador > 2 && $contador < 5) { ?>
38+
39
google_ad_width = 728;
40
google_ad_height = 90;
41
//-->
42
</script>
43
<script type="text/javascript"
44
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
45
</script>
46
</div>
47
<div id="cuerpo">
48
<div id="contenido-index">
49
<?php } ?>
50
51
<?php }
52
elseif ($contador > 2 && $contador < 6) { ?>
53
<div class="resumen2">
54
<?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'homepage-thumb' ); } ?>
55
<span class="titulo"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span>
56
<span class="desc"><?php echo excerpt(40); ?></span>
57
</div>
58
59
<?php } else { ?>
60
<div class="resumen3">
61
<?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'home-thumb' ); } ?>
62-
<?php get_footer(); ?>
62+
63
<span class="desc"><?php echo excerpt(35); ?></span>
64
</div>
65
66
<?php } ?>
67
68
<?php endwhile; ?>
69
70
<?php if (function_exists('wp_corenavi')) wp_corenavi(); ?>
71
</div>
72
73
<?php get_sidebar(); ?>
74
</div>
75
76
<?php get_footer(); ?>