Grow your CSS skills. Land your dream job.

Infinite scroll help needed

  • # December 21, 2012 at 1:28 am

    Hey all,

    still working on this wordpress theme: [Tingeltangel](http://tingeltangel.megavillain.org/ “Tingeltangel”)

    In the archive I have masonry ordered thumbnails which i would like to be paginated with infinite scroll. but therefore I would need a second pagination (a next / prev pagination is already applied to the fullscreen image post). I’m totally stuck and I don’t know how I’m supposed to get infinite scroll working.

    Here’s my Index.php

    < ?php get_header(); ?>

    < ?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    < ?php query_posts(array('posts_per_page' => ‘1’, ‘paged’=>$page)); ?>
    < ?php while (have_posts()) : the_post(); ?>

    if ( $image_src = wp_get_attachment_image_src( $thumbnail_id, ‘normal-bg’ ) )
    printf( ‘ style=”background-image: url(%s);”‘, $image_src[0] );}?>>

    < ?php endwhile; ?>

    < ?php wp_reset_query(); ?>

    close

    < ?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>

    “>< ?php the_post_thumbnail('medium'); ?>

    < ?php the_title(); ?>

    < ?php the_time('jS F Y'); ?>


    < ?php the_tags( '

    ‘, ”, ‘

    ‘); ?>

    < ?php endwhile; endif; ?>

    < ?php get_footer(); ?>

    Help is very appreciated!

    # December 21, 2012 at 6:10 am

    no idea?

    # December 21, 2012 at 9:53 am

    I take it you’ve read through the links highlighted at the masonry website? http://masonry.desandro.com/demos/infinite-scroll.html

    # December 21, 2012 at 1:53 pm

    sure I did. the trouble is setting up a second pagination because the infinite scroll plugin for WP needs a link to load more posts. i don’t know how to achieve that…

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".