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