• Resolved webtomeasure

    (@webtomeasure)


    Hi,
    I have a custom theme built off twentytwelve. On my site, I have a custom post (story) archive page where users can filter and view the catalogue of stories on the site. The filtering is based off the “query multiple taxonomies” plugin.

    As you can see on the page, there are paginination controls at the bottom of the page to skip to the next page etc., using a shortcode from plugin wp-pagenav. I’d like to change this to Infinite Scrolling with Jetpack, but I don’t know exactly how to do it. Can you advise if this is supportable and if so how. I have pasted below the php code in the specific archive php file I’d like to address.

    /* Start the div for the catalogue items */
    echo ‘<section id=”catalogue-section”>’;

    /* Start the Loop */
    $posts = query_posts($query_string . ‘&orderby=rand’); /* Randomise the order please */
    while ( have_posts() ) : the_post();

    /* Show the catalogue entry */
    echo ‘<div class=”catalogue”>’;
    echo ‘<a class= “sks-story-link” href=”‘;
    the_permalink();
    echo ‘”>’;
    echo ‘<h2 class=”sks-title” >’;
    the_title();
    echo ‘</h2> </br>’;
    the_post_thumbnail(‘story-thumb’, array(‘class’ => ‘left-thumb’));
    the_excerpt();
    echo ‘‘;
    echo ‘<div class=”tag-section”>’;
    echo get_the_term_list( $post->ID, ‘authors’, ‘<h3> By ‘, ‘, ‘, ‘ </h3>’ );
    echo get_the_term_list( $post->ID, ‘narrators’, ‘Narrator: ‘, ‘, ‘, ‘ ‘ );
    echo get_the_term_list( $post->ID, ‘age-range’, ‘Age range: ‘, ‘, ‘, ‘ ‘ );
    echo get_the_term_list( $post->ID, ‘story_category’, ‘Tags: ‘, ‘, ‘, ‘ ‘ );
    echo get_the_term_list( $post->ID, ‘animal’, ‘Animals: ‘, ‘, ‘, ‘ ‘ );
    echo get_the_term_list( $post->ID, ‘transport’, ‘Other: ‘, ‘, ‘, ‘ ‘ );
    echo get_the_term_list( $post->ID, ‘reading-time’, ‘Reading time: ‘, ‘, ‘, ‘ ‘ );
    echo ‘</div>’; // div.tag-section
    echo ‘</div>’; // div.catalogue

    endwhile;

    echo ‘</section></br>’; // Close catalogue-section

    // echo ‘Page Navigation’;
    wp_pagenavi();

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Infinite scroll on Custom post archive’ is closed to new replies.