Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to use Infinite Scroll in my WP theme for both Index, Category and Archive. The official WP plug-in doesn't seem to support IS for Category and Archive so I figured I'd make a manual install, however I can't get it to function properly.

For example, this is what my category.php looks like -

<?php get_header(); ?>

    <?php get_sidebar(); ?>

    <div id="category">
        <?php $category = get_the_category(); query_posts('cat=' . $category[0]->cat_ID . '&paged=' . $paged); ?>
        <?php while ( have_posts() ) : the_post(); ?>
            <article>
                <?php the_content(); ?>
            </article>
        <?php endwhile; ?>
    </div>

    <div id="pagination">
        <?php next_posts_link(); ?>
    </div>

<?php get_footer(); ?>

I include the latest release of IS found at https://github.com/paulirish/infinite-scroll/, then run it with it's default settings where I set #category to be the container in effect, and article the itemSelector. navSelector is set to #pagination and nextSelector to #pagination a:first, which seems right. Nothing happens, though I get no JS errors. I see the static next post link and it works as it should. What am I missing?

share|improve this question

1 Answer 1

It's a little bit of code, so I'll ask you to take a look at this theme I did. It implements infinite scroll for the home page, category and tags, and i'll soon implement this functionality for other types of listings like archives and search.

share|improve this answer
    
Thanks, not sure I might be able to solve it but I'll have a look. –  Staffan Estberg Aug 1 '12 at 17:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.