Carlos Figueroa
1
Mi
Verificado
Verificación en dos pasos activada
Verificado por Whatsapp
¡Ha verificado su Paypal!
¡Excelente comerciante!
¡Usuario popular!
Suscripción a IA
Exelente tutorial me sirvio mucho..:encouragement:
Ese ultimo codigo asi random, me va de maravilla en mi blog: Enlace eliminado
muesto 2 bloques de adsense en random y muestran y desaparecen
gracias este junto el otro tutorial es lo que buscaba
Gracias por el aporte, voy a probarlo..
ufff excelente me sirvió a la perfección siguiendo las indicaciones dadas...Muchas gracias...
Excelente tutorial :encouragement: . acabo de implementarlo de esta forma en mi blog :drunk:
<?php get_header(); ?>
<!-- CONTENT -->
<div id="content">
<?php
if ( $paged < 2 && of_get_option('gamepress_slider_radio', '1')) :
if (of_get_option('gamepress_slider_type') == '1'):
get_template_part( 'includes/nivo_default' );
elseif (of_get_option('gamepress_slider_type') == '2'):
get_template_part( 'includes/nivo_thumbnails' );
endif;
endif;
?>
<?php if ( have_posts() ) : ?>
<section id="main-content" role="main">
<?php if ( $paged < 2 && (of_get_option('gamepress_slider_radio') == '2' || of_get_option('gamepress_slider_radio') == '1')) : ?>
<h2 class="section-header"><?php _e('Latest news', 'gamepress'); ?></h2>
<?php endif; ?>
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
if (of_get_option('gamepress_hp_layout') == '2'):
get_template_part('content','bigthumb');
elseif (of_get_option('gamepress_hp_layout') == '3') :
get_template_part('content', 'smallthumb');
else :
get_template_part('content');
endif;
?>
<?php endwhile; ?>
<?php else : ?>
<section id="main-content" role="main" class="full-height">
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'gamepress' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'It seems we can’t find what you’re looking for. Perhaps searching can help.', 'gamepress' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</section>
<?php
if(function_exists('wp_pagenavi')) :
wp_pagenavi();
else :
?>
<div class="wp-pagenavi">
<div class="alignleft"><?php next_posts_link('« '.__('Older posts','gamepress')) ?></div>
<div class="alignright"><?php previous_posts_link(__('Newer posts','gamepress').' »') ?></div>
</div>
<?php endif; ?>
</div>
<!-- END CONTENT -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="load_posts_container">
<?php
$category_ID = get_category_id('blog');
$args = array(
'post_type' => 'post',
'posts_per_page' => 12,
'cat' => '-' . $category_ID,
'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1)
);
query_posts($args);
$x = 0;
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
if($paged > 1)
$y = (0 + (($paged-1) * 12));
else
$y = 0;
while (have_posts()) : the_post(); ?>
<?php if($x == 2) { ?>
<div class="home_post_box home_post_box_last" onmouseover="show_post_desc(<?php echo $y; ?>)" onmouseout="hide_post_desc(<?php echo $y; ?>)">
<?php } else { ?>
<div class="home_post_box" onmouseover="show_post_desc(<?php echo $y; ?>)" onmouseout="hide_post_desc(<?php echo $y; ?>)">
<?php } ?>
<!--<img src="<?php bloginfo('stylesheet_directory'); ?>/images/blog-image.jpg" />-->
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('home-post',array('alt' => 'post image', 'class' => 'rounded')); ?></a>
<div class="home_post_desc" id="home_post_desc<?php echo $y; ?>">
<?php $temp_arr_content = explode(" ",substr(strip_tags(get_the_content()),0,225)); $temp_arr_content[count($temp_arr_content)-1] = ""; $display_arr_content = implode(" ",$temp_arr_content); echo $display_arr_content . '...'; ?>
</div><!--//home_post_desc-->
<div class="home_post_title_cont">
<h3><?php the_title(); ?></h3>
<h4><?php the_category(', '); ?></h4>
</div><!--//home_post_title_cont-->
</div><!--//home_post_box-->
<?php if($x == 2) { $x = -1; /*echo '<div class="clear"></div>';*/ } ?>
<?php $x++; $y++; ?>
<?php endwhile; ?>
<?php wp_reset_query(); ?>
<div class="clear"></div>
</div><!--//load_posts_container-->
<div class="load_more_cont">
<p align="center"><span class="load_more_text"><?php next_posts_link('<img src="' . get_bloginfo('stylesheet_directory') . '/images/load-more-image.png" />') ?></span></p>
</div><!--//load_more_cont-->
<script type="text/javascript">
// Ajax-fetching "Load more posts"
$('.load_more_cont a').live('click', function(e) {
e.preventDefault();
//$(this).addClass('loading').text('Loading...');
//$('.load_more_text a').html('Loading...');
$.ajax({
type: "GET",
url: $(this).attr('href') + '#main_container',
dataType: "html",
success: function(out) {
result = $(out).find('#load_posts_container .home_post_box');
nextlink = $(out).find('.load_more_cont a').attr('href');
//alert(nextlink);
//$('#boxes').append(result).masonry('appended', result);
$('#load_posts_container').append(result);
//$('.fetch a').removeClass('loading').text('Load more posts');
//$('.load_more_text a').html('Load More');
if (nextlink != undefined) {
$('.load_more_cont a').attr('href', nextlink);
} else {
$('.load_more_cont').remove();
$('#load_posts_container').append('<div class="clear"></div>');
// $('.load_more_cont').css('visibilty','hidden');
}
if (nextlink != undefined) {
$.get(nextlink, function(data) {
//alert(nextlink);
if($(data + ":contains('home_post_box')") != '') {
//alert('not found');
// $('.load_more_cont').remove();
$('#load_posts_container').append('<div class="clear"></div>');
}
});
}
}
});
});
</script>
<?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?