This topic has 18 replies, 4 voices, and was last updated 9 years by renemusic.

  • Author
  • #50263
     statusselect
    Participant

    How do I make KLEO work with JetPack Infinite Scroll? Here are the generic instructions, but I can’t seem to figure it out with KLEO. Please advise 🙂 http://jetpack.me/support/infinite-scroll/

    #50538
     Laura
    Moderator

    Hello, what type of layout for posts? Masonry, thumb, normal?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #50559
     statusselect
    Participant

    Normal, I think? Basically what I want to achieve is infinite scroll inside of an article the way it does on http://www.forbes.com/ where you click on an article, and then you can just keep scrolling to summon new articles.

    #50784
     statusselect
    Participant

    P.S. I do use Masonry view on the template, but I want infinity scroll inside the post. (Incase I was unclear in my last post)

    #51267
     Laura
    Moderator

    Hello, i saw this plugin working very good with the theme
    http://codecanyon.net/item/animate-lazy-load-wordpress-plugin/9315381

    As for now the infinite scroll code is not finished… maybe another plugin can help

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #53382
     renemusic
    Participant

    I have bought the animate lazy load plugin, but it does not work with the masonry view posts and it also does not work smoothly in woocommerce. The first products on the page have a white colored thumbnail. While scrolling further down the woocommerce page, they appear smoothly.
    I have checked there documentation, but i cannot seem to figure it out. Any ideas?

    They only mention this in the documentation for custom templates:

    //Example : 1
    $html = ‘‘;
    $html .= ‘<p>animate lazy load image</p>’;
    $html .= ‘‘;
    $html = apply_filters( ‘animate_lazy_load_html’, $html );
    echo $html;

    //Example : 2
    $page_id = 1;
    $page_data = get_page( $page_id );
    echo ‘<h3>’. $page_data->post_title .'</h3>’;
    echo apply_filters(‘the_content’, $page_data->post_content);

    //Example : 3
    $content = apply_filters( ‘the_content’, get_the_content() );
    $content = str_replace( ‘]]>;’, ‘]]&>’, $content );
    echo $content;

    #53626
     Laura
    Moderator

    Hello, right now there isnt a good integration but maybe in a future update it can be added, you could also hire a developer to check it out for you. I still suggest to use lazy load plugin because it increases the load speed of your website

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    Laura Solanes - Graphic Designer and Web Designer

    Please be patient as I try to answer each topic as fast as i can.

    If you like the theme or the support you've received please consider leaving us a review on Themeforest!

    Always happy to help you 🙂

    #60617
     fanartix
    Participant

    you have to put id=”content” inside kleo’s index.php (in a div next to line 104, before the loop) and put this on kleo’s functions.php:

    add_theme_support( ‘infinite-scroll’, array(
    ‘type’ => ‘scroll’,
    ‘footer_widgets’ => true,
    ‘container’ => ‘content’,
    ‘wrapper’ => true,
    ‘render’ => ‘kleo_render_infinite_scroll’,
    ‘posts_per_page’ => false
    ) );

    function kleo_render_infinite_scroll() {
    while ( have_posts() ) : the_post();

    /*
    * Include the post format-specific template for the content. If you want to
    * use this in a child theme, then include a file called called content-___.php
    * (where ___ is the post format) and that will be used instead.
    */
    ?>
    <?php
    if ( $blog_type != ‘standard’ ) :
    get_template_part( ‘page-parts/post-content-‘ . $blog_type );
    else:
    get_template_part( ‘content’, get_post_format() );
    endif;

    endwhile;
    }

    #60639
     renemusic
    Participant

    Thank you for the input fanartix! I tried the above solution edited the div and placed the other code in functions.php.
    the infinite scroll seems not to be triggered and maybe i am doing something wrong.
    Is this the right way in index.php?

    COPY CODE
        <?php
        if ($blog_type == 'masonry') : ?>
            <div id="content" class="row responsive-cols kleo-masonry per-row-<?php echo sq_option( 'blog_columns', 3 );?>">
        <?php endif; ?>
    #60641
     fanartix
    Participant

    It looks right… I forgot to mension I commented kleo_pagination(); on index.php. It works here…

    #60642
     fanartix
    Participant

    you checked the infinite scroll option in jetpack configurations, right? don’t know what else could you be doing wrong. Just checking: the functions you put inside php tags, right? <?php put_functions_here ?>

    #60643
     renemusic
    Participant

    Thank you fanartix for your reply,

    I have double checked it and the jetpack with infinite sroll is activated.
    index.php is adjusted as above and i have commented out kleo pagination as you suggested, but still no luck
    To be sure, can you copy paste your code using the code tag in this post another time?

    #60644
     fanartix
    Participant
    COPY CODE
    <?php
    add_theme_support( 'infinite-scroll', array(
        'type'           => 'scroll',
        'footer_widgets' => true,
        'container'      => 'content',
        'wrapper'        => true,
        'render'         => 'kleo_render_infinite_scroll',
        'posts_per_page' => false
    ) );
    
    function kleo_render_infinite_scroll() {
    	while ( have_posts() ) : the_post();
    
    		/*
    		 * Include the post format-specific template for the content. If you want to
    		 * use this in a child theme, then include a file called called content-___.php
    		 * (where ___ is the post format) and that will be used instead.
    		 */
    		?>
    		<?php 
    		if ( $blog_type != 'standard' ) :
                get_template_part( 'page-parts/post-content-' . $blog_type );
    		else:  
                get_template_part( 'content', get_post_format() );
    		endif;
    		
    	endwhile;
    } ?>
    #60645
     fanartix
    Participant

    there were 2 wrong things in the code:
    1)try to change
    type' => 'scroll',
    for
    type' => 'click',
    and place a comma after
    'posts_per_page' => false

    and take a look at jetpack otions max posts per page. I noticed that if you let as default (10) it does’nt show all page content. So it might be better to uncomment kleo paginatin to avoid problems.

    #60656
     renemusic
    Participant

    No luck yet on my theme with the above solution from Fanartix. Has anyone tried this as well?

    #60685
     renemusic
    Participant

    An infinite scroll would be such a great option to be integrated in the KLEO theme:-)
    KLEO already has the wishlist from Yith included. maybe it is a good idea to also inlcude the infinite scroll from them.
    I just tried the infinite scroll from Yith and it works half. Content is loaded but content is empty / white

    #60716
     fanartix
    Participant

    maybe this works…

    need to check this too

    #60717
     fanartix
    Participant
    #60868
     renemusic
    Participant

    Thank you Fanartix, i will check the tutorial:-)

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

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?