Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/02/2015, 06:49
kolvenik
 
Fecha de Ingreso: febrero-2015
Mensajes: 5
Antigüedad: 9 años, 2 meses
Puntos: 0
Wordpress Infinity Scroll - PROBLEMA - cargar mas post

Buenas a todos.
Tengo mi página web con wordpress. Soy nuevo creando temas y estoy intentando añadir el plugin "Infinity Scroll". Tengo un post type creado llamado portfolio, con su single-portfolio.php, archive-portfolio.php y content-portfolio.php. Todas las entradas las muestra correctamente, el problema es que el scroll no funciona.

Código de functions.php:


function idenvas_infinite_scroll_init() {
add_theme_support( 'infinite-scroll', array(
'type' => 'scroll',
'container' => 'portfolio',
'port_per_page' => 12,
) );
}
add_action( 'after_setup_theme', 'idenvas_infinite_scroll_init' );



Código de archive-portfolio.php:


<div id="portfolio">
<ul>
<?php
while (have_posts()) : the_post();
get_template_part( 'content-portfolio', get_post_format() );
endwhile;
?>
</ul>

</div>



Código de content-portfolio.php:


<li>
<?php if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink();?>">
<?php the_post_thumbnail( 'portfolio_thumbs' ); } ?>
</a>
</li>


Gracias de antemano a todos los que le echeis un ojo