• It took some tweaking, and needs a bit more, but this plugin is the plugin I’ve been looking for. I tried many other solutions, and thanks to Tom Harrigan we’ve got a solution that’s working. I’ve now got a WP site with a Genesis theme doing forever scroll on the single posts like QZ, Time, NYTimes, and all the big sites are doing.

    Thanks for making this guys! And more importantly, thanks for the support!!!

Viewing 3 replies - 1 through 3 (of 3 total)
  • i have a genesis based theme too i would like to know how to get it work

    Hey @jmichaeledwards

    Sounds great that you made it work with Genesis. Can you share your code somewhere?

    Thanks in advance 0:)

    Thread Starter jmichaeledwards

    (@jmichaeledwards)

    To make this plugin work with the parallax-pro from Genesis, and to work with Mashable, we added the following to my theme’s functions.php file. And I also have a custom post type called “issue”. If I remember, we’ve got something in there to make it work with that too. Hope this helps, and I apologize for the slow response.

    // Add a CSS ID to main element for Infinite Scrolling
    add_filter( ‘genesis_attr_content’, ‘lc_custom_attributes_content’ );
    function lc_custom_attributes_content( $attributes ) {
    $attributes[‘id’] = ‘main-content’;
    return $attributes;

    }

    // Infinite Scrolling
    add_action( ‘init’, ‘metro_pro_infinite_transporter_init’ );
    function metro_pro_infinite_transporter_init() {
    add_theme_support( ‘infinite-transporter’, array(
    ‘container’ => ‘main-content’,
    ‘footer’ => false,
    ‘render’ => ‘genesis_render’,
    ‘google_analytics’ => true
    ) );
    }
    function genesis_render() {
    if ( have_posts() ) :

    do_action( ‘genesis_before_while’ );
    while ( have_posts() ) : the_post();

    do_action( ‘genesis_before_entry’ );

    printf( ‘<article data-url=”%s” %s>’, get_permalink(), genesis_attr( ‘entry’ ) );

    do_action( ‘genesis_entry_header’ );

    do_action( ‘genesis_before_entry_content’ );

    printf( ‘<div %s>’, genesis_attr( ‘entry-content’ ) );
    do_action( ‘genesis_entry_content’ );
    echo ‘</div>’;

    do_action( ‘genesis_after_entry_content’ );

    do_action( ‘genesis_entry_footer’ );

    echo ‘</article>’;

    endwhile; //* end of one post

    else : //* if no posts exist
    do_action( ‘genesis_loop_else’ );
    endif; //* end loop
    }
    // Start Vitaly-jme77
    // Fix on infinite scroll plugin to match post_type
    add_action(‘single_infinite_transporter_query_args’, ‘infinite_scroll_post_type_fix’);
    function infinite_scroll_post_type_fix($query_args)
    {
    $query_args[‘post_type’] = get_post_type((int)$_REQUEST[‘postID’]);
    $query_args[‘date_query’] = array(
    array(
    ‘before’ => $_REQUEST[‘last_post_date’],
    ‘inclusive’ => true,
    )
    );

    return $query_args;
    }
    add_filter(‘the_content’,’mashsharer_ajaxload_exclude’, 9999, 1);
    function mashsharer_ajaxload_exclude($content){
    if(defined(“DOING_AJAX”) && DOING_AJAX){
    $content = preg_replace(‘#<aside class=”mashsb-container”>(.*?)</aside>#is’, ”, $content);
    }
    return $content;
    }
    //End Vitaly-jme77

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘I've been looking for this for years’ is closed to new replies.