Jhoel Mori
1
Zeta
SEO
Suscripción a IA
<?php $thumb = '';
$width = get_option('polished_thumbnail_width_usual');
$height = get_option('polished_thumbnail_height_usual');
$classtext = 'post_img';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>
<!-- New Post-->
<div class="new_post">
<h2 class="title"><a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>"><?php the_title(); ?></a></h2>
<?php if (get_option('polished_postinfo1') <> '') include(TEMPLATEPATH . '/includes/postinfo.php'); ?>
<div class="postcontent">
<?php if($thumb <> '') { ?>
<a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>">
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
</a>
<?php }; ?>
<?php if (get_option('polished_blog_style') == 'false') { ?>
<p><?php truncate_post(445); ?></p>
<?php } else { ?>
<?php the_content(''); ?>
<?php }; ?>
<span class="readmore_b"><a class="readmore" href="<?php the_permalink(); ?>"><?php _e('Read More','Polished'); ?></a></span>
<div class="clear"></div>
</div> <!-- end .postcontent -->
</div>
<!-- End Post -->
<?php if (is_archive()) $post_number = get_option('polished_archivenum_posts');
if (is_search()) $post_number = get_option('polished_searchnum_posts');
if (is_tag()) $post_number = get_option('polished_tagnum_posts'); ?>
<?php get_header(); ?>
<?php global $query_string; query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
<div id="wrap">
<!-- Main Content-->
<img src="<?php bloginfo('stylesheet_directory');?>/images/content-top.gif" alt="content top" class="content-wrap" />
<div id="content">
<!-- Start Main Window -->
<div id="main">
<?php $contador=0; if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
<?php $contador++; ?>
<?php if ($contador == 2) : ?>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2831720998621927";
/* adsensebloquegrande */
google_ad_slot = "3093353587";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php endif; ?>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
<?php } ?>
<?php else : ?>
<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
<?php endif; wp_reset_query(); ?>
</div>
<!-- End Main -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php if ($contador == 2) : ?>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2831720998621927";
/* adsensebloquegrande */
google_ad_slot = "3093353587";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php endif; ?>
<?php if (is_archive()) $post_number = get_option('polished_archivenum_posts');
if (is_search()) $post_number = get_option('polished_searchnum_posts');
if (is_tag()) $post_number = get_option('polished_tagnum_posts'); ?>
<?php get_header(); ?>
<?php global $query_string; query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
<div id="wrap">
<!-- Main Content-->
<img src="<?php bloginfo('stylesheet_directory');?>/images/content-top.gif" alt="content top" class="content-wrap" />
<div id="content">
<!-- Start Main Window -->
<div id="main">
<?php $contador=0; if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
<?php $contador++; ?>
<?php if ($contador == 2) { ?>
<!-- aca tu codigo de Google Adsense, no borres este comentario -->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2831720998621927";
/* adsensebloquegrande */
google_ad_slot = "3093353587";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php } ?>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
<?php } ?>
<?php else : ?>
<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
<?php endif; wp_reset_query(); ?>
</div>
<!-- End Main -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php if (is_archive()) $post_number = get_option('polished_archivenum_posts');
if (is_search()) $post_number = get_option('polished_searchnum_posts');
if (is_tag()) $post_number = get_option('polished_tagnum_posts'); ?>
<?php get_header(); ?>
<?php global $query_string; query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
<div id="wrap">
<!-- Main Content-->
<img src="<?php bloginfo('stylesheet_directory');?>/images/content-top.gif" alt="content top" class="content-wrap" />
<div id="content">
<!-- Start Main Window -->
<div id="main">
<?php $contador=0; if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
<?php $contador++; ?>
<?php if ($contador == 2) { ?>
<!-- aca tu codigo de Google Adsense-->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2831720998621927";
/* adsensebloquegrande */
google_ad_slot = "3093353587";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php } ?>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
<?php } ?>
<?php else : ?>
<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
<?php endif; wp_reset_query(); ?>
</div>
<!-- End Main -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php $thumb = '';
$width = get_option('polished_thumbnail_width_usual');
$height = get_option('polished_thumbnail_height_usual');
$classtext = 'post_img';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>
<!-- New Post-->
<div class="new_post">
<h2 class="title"><a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>"><?php the_title(); ?></a></h2>
<?php if (get_option('polished_postinfo1') <> '') include(TEMPLATEPATH . '/includes/postinfo.php'); ?>
<div class="postcontent">
<?php if($thumb <> '') { ?>
<a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>">
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
</a>
<?php }; ?>
<?php if (get_option('polished_blog_style') == 'false') { ?>
<p><?php truncate_post(445); ?></p>
<?php } else { ?>
<?php the_content(''); ?>
<?php }; ?>
<span class="readmore_b"><a class="readmore" href="<?php the_permalink(); ?>"><?php _e('Read More','Polished'); ?></a></span>
<div class="clear"></div>
</div> <!-- end .postcontent -->
<?php if ($contador == 2) : ?>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2831720998621927";
/* adsensebloquegrande */
google_ad_slot = "3093353587";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php endif; ?>
</div>
<!-- End Post -->
<?php if (is_archive()) $post_number = get_option('polished_archivenum_posts');
if (is_search()) $post_number = get_option('polished_searchnum_posts');
if (is_tag()) $post_number = get_option('polished_tagnum_posts'); ?>
<?php get_header(); ?>
<?php global $query_string; query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
<div id="wrap">
<!-- Main Content-->
<img src="<?php bloginfo('stylesheet_directory');?>/images/content-top.gif" alt="content top" class="content-wrap" />
<div id="content">
<!-- Start Main Window -->
<div id="main">
<?php $contador=0; if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php include(TEMPLATEPATH . '/includes/entry.php'); ?>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
<?php } ?>
<?php else : ?>
<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
<?php endif; wp_reset_query(); ?>
</div>
<!-- End Main -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php $thumb = '';
$width = get_option('polished_thumbnail_width_usual');
$height = get_option('polished_thumbnail_height_usual');
$classtext = 'post_img';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>
<!-- New Post-->
<div class="new_post">
<h2 class="title"><a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>"><?php the_title(); ?></a></h2>
<?php if (get_option('polished_postinfo1') <> '') include(TEMPLATEPATH . '/includes/postinfo.php'); ?>
<div class="postcontent">
<?php if($thumb <> '') { ?>
<a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>">
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
</a>
<?php }; ?>
<?php if (get_option('polished_blog_style') == 'false') { ?>
<p><?php truncate_post(445); ?></p>
<?php } else { ?>
<?php the_content(''); ?>
<?php }; ?>
<span class="readmore_b"><a class="readmore" href="<?php the_permalink(); ?>"><?php _e('Read More','Polished'); ?></a></span>
<div class="clear"></div>
</div> <!-- end .postcontent -->
<?php $contador++; ?>
<?php if ($contador == 2) { ?>
<!-- aca tu codigo de Google Adsense-->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2831720998621927";
/* adsensebloquegrande */
google_ad_slot = "3093353587";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php } ?>
</div>
<!-- End Post -->
<?php if (is_archive()) $post_number = get_option('polished_archivenum_posts');
if (is_search()) $post_number = get_option('polished_searchnum_posts');
if (is_tag()) $post_number = get_option('polished_tagnum_posts'); ?>
<?php get_header(); ?>
<?php global $query_string; query_posts($query_string . "&showposts=$post_number&paged=$paged"); ?>
<div id="wrap">
<!-- Main Content-->
<img src="<?php bloginfo('stylesheet_directory');?>/images/content-top.gif" alt="content top" class="content-wrap" />
<div id="content">
<!-- Start Main Window -->
<div id="main">
<?php $contador=0; if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $thumb = '';
$width = get_option('polished_thumbnail_width_usual');
$height = get_option('polished_thumbnail_height_usual');
$classtext = 'post_img';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>
<!-- New Post-->
<div class="new_post">
<h2 class="title"><a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>"><?php the_title(); ?></a></h2>
<?php if (get_option('polished_postinfo1') <> '') include(TEMPLATEPATH . '/includes/postinfo.php'); ?>
<div class="postcontent">
<?php if($thumb <> '') { ?>
<a href="<?php the_permalink() ?>" title="<?php printf(__ ('Permanent Link to %s', 'Polished'), $titletext) ?>">
<?php print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext , $width, $height, $classtext); ?>
</a>
<?php }; ?>
<?php if (get_option('polished_blog_style') == 'false') { ?>
<p><?php truncate_post(445); ?></p>
<?php } else { ?>
<?php the_content(''); ?>
<?php }; ?>
<span class="readmore_b"><a class="readmore" href="<?php the_permalink(); ?>"><?php _e('Read More','Polished'); ?></a></span>
<div class="clear"></div>
</div> <!-- end .postcontent -->
<?php $contador++; ?>
<?php if ($contador == 2) { ?>
<!-- aca tu codigo de Google Adsense-->
<script type="text/javascript"><!--
google_ad_client = "ca-pub-2831720998621927";
/* adsensebloquegrande */
google_ad_slot = "3093353587";
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<?php } ?>
</div>
<!-- End Post -->
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
else { ?>
<?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
<?php } ?>
<?php else : ?>
<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
<?php endif; wp_reset_query(); ?>
</div>
<!-- End Main -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<center></center>
:O muchas pero muchas gracias XD
Ya me funciona solo hise los 2 primeros pasos lo del index y el entry de paso añadí una etiquetacrees que tenga problemas lo hise pa que este centrado el adsense bueno ahora si ya funciono gracias 🙂HTML:<center></center>
excelente el codigo y el aporte, se agradece!!!!... me funciona de 10 el codigo para rotar los ads y de hecho para quien pregunto, según mis pruebas personales con otros codigos y sitios, este tipo de practicas mejoran el CTR de adsense....
ahora se las pongo mas dificil, hice yo las pruebas con el codigo que dejaron aca pero no me camino...
como sería para mostrar en forma rotativa dos anuncios distintos en el index... o sea por ejemplo, que se muestre debajo del primero y debajo del 5 post?...
saludos
<?php $contador=0; $cantpost = array("1","2","3"); shuffle($cantpost); $mostrarads = array_rand($cantpost,1); $cantpost2 = array("4","5","6"); shuffle($cantpost2); $mostrarads2 = array_rand($cantpost2,1); if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $contador++; ?>
<?php
if ($contador == 6) {
}
else {
if ($contador == $mostrarads) : ?>
<!-- aca tu codigo de Google Adsense-->
<?php endif;
if ($contador == $mostrarads2) : ?>
<!-- aca el otro codigo -->
<?php endif; }
?>
<?php
/**
* Index Template
*
* The index template is a placeholder for all cases that don't have a template file.
* Ideally, all fases would be handled by a more appropriate template according to the
* current page context (for example, `tag.php` for a `post_tag` archive or `single.php`
* for a single blog post).
*
* @package WooFramework
* @subpackage Template
*/
get_header();
global $woo_options;
?>
<!-- #content Starts -->
<?php woo_content_before(); ?>
<div id="content" class="col-full">
<div id="main-sidebar-container">
<!-- #main Starts -->
<?php woo_main_before(); ?>
<div id="main" class="col-left">
<?php get_template_part( 'loop', 'index' ); ?>
</div><!-- /#main -->
<?php woo_main_after(); ?>
<?php get_sidebar(); ?>
</div><!-- /#main-sidebar-container -->
<?php get_sidebar( 'alt' ); ?>
</div><!-- /#content -->
<?php woo_content_after(); ?>
<?php get_footer(); ?>
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?
Utilizamos cookies y tecnologías similares para los siguientes fines:
¿Aceptas las cookies y estas tecnologías?