Infinite scroll with child theme

Home Forums Plugin Integration Infinite scroll with child theme

This topic is: not resolved

This topic contains 1 reply, has 1 voice, and was last updated by  shenanigans 3 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4102

    shenanigans
    Participant

    Hey guys.

    I’m running Thematic 1.0.4. with the latest WP (3.8.1.) and am currently trying to integrate infinite scroll into my child theme. So far with no success unfortunately. Installing Jetpack and following this tutorial ( http://www.ejhansel.com/wordpress-jetpack-infinite-scroll-and-the-thematic-framework/ ) did not work for me.

    I’m using a static page for my website’s start page where I added custom php code to show my latest news teasers etc.

    
    <div id="the_main_content_three_column">
    <div id="home_stickie_portrait">
    <?php
    $my_query = new WP_Query(‘category_name=home_stickie_portrait&showposts=1’);
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID;
    ?>
    <p class="hentry_date_start"><?php the_field(‘home_portrait_category’); ?></p>
    <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/navigation/excerpt_line.gif" height="1" width="285" />
    <div class="excerpt_headline">
    <a class="category-portrait" href="portrait"><?php the_field(‘home_portrait_headline’); ?></a>
    </div>
    <div class="excerpt_subline">
    <p><?php the_field(‘home_portrait_subline’); ?></p>
    </div>
    <?php the_post_thumbnail(); ?>
    <p><?php the_field(‘home_portrait_intro’); ?><a class="read_more" href="portrait"></a></p>
    </div>
    <?php endwhile; ?>
    <!– Do other stuff… –>
    
    <?php
    if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts);
    ?>
    <!– Do stuff… –>
    <?php endwhile; endif; ?>
    
    <?php
    if ( get_query_var(‘paged’) ) { $paged = get_query_var(‘paged’); }
    elseif ( get_query_var(‘page’) ) { $paged = get_query_var(‘page’); }
    else { $paged = 1; }
    $my_query = new WP_Query(‘cat=33,35&paged=’.$paged);
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID;
    if (in_category(‘Blog’))
    {
    ?>
    <div class="hentry_start">
    <p class="hentry_date_start"><?php the_time(‘d. F Y’); ?></p>
    <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/navigation/excerpt_line.gif" height="1" width="285" />
    <div class="excerpt_headline">
    <a <?php post_class(); ?> href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    </div>
    <div class="excerpt_subline">
    <?php if (function_exists(‘the_subheading’)) { the_subheading(‘<p>’, ‘</p>’); } ?>
    </div>
    <?php the_post_thumbnail(); ?>
    <?php the_content(); ?>
    </div>
    <?php
    }
    elseif (in_category(‘Magazin’))
    {
    ?>
    <div class="hentry_start">
    <p class="hentry_date_start"><?php the_time(‘d. F Y’); ?></p>
    <img src="<?php echo get_stylesheet_directory_uri(); ?>/images/navigation/excerpt_line.gif" height="1" width="285" />
    <div class="excerpt_headline">
    <a <?php post_class(); ?> href="<?php the_field(‘download’); ?>"><?php the_title(); ?></a>
    </div>
    <div class="excerpt_subline">
    <p><?php the_field(‘titel’); ?> | <?php the_field(‘fundstelle’); ?> | <?php the_field(‘mitautor’); ?></p>
    </div>
    <?php the_post_thumbnail(); ?>
    <p><?php echo custom_field_auszug(); ?></p>
    <a class="btn_download_publikationen" href="<?php the_field(‘download’); ?>"></a>
    </div>
    <?php
    }
    ?>
    <?php endwhile; ?>
    <!– Do other stuff… –>
    
    <div class="pagination">
    <?php posts_nav_link(); ?>
    <?php posts_nav_link(‘ · ‘, ‘previous page’, ‘next page’); ?>
    
    <?php
    global $my_query;
    
    $big = 999999999;
    echo paginate_links( array(
    ‘base’ => str_replace( $big, ‘%#%’, esc_url( get_pagenum_link( $big ) ) ),
    ‘format’ => ‘?paged=%#%’,
    ‘total’ => $my_query->max_num_pages,
    ‘prev_next’ => $my_query->True,
    ‘prev_text’ => __( $big, ‘&laquo; Previous’),
    ‘next_text’ => __( $big, ‘Next &raquo;’)
    ) ) ?>
    <?php
    if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts);
    ?>
    <?php endwhile; endif; ?>
    </div>
    <!– Do stuff… –>
    </div>
    
    

    Is the integration of infinite scroll in general tricky with Thematic?Any ideas? Thanks so much 🙂

    #4106

    shenanigans
    Participant

    Hey guys,

    after trying for days to make this work, I’ve given up on this. However, I am now going to integrate a conventional pagination which also doesn’t work as expected…

    I’m going to open another thread so this one here can be closed or deleted.

    Thanks…

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

The topic ‘Infinite scroll with child theme’ is closed to new replies.