• Resolved siomerro

    (@siomerro)


    Hi, I have a problem with my custom template for WordPress site. I’m trying to add infinite scroll to my website. On home page from infinite scroll functionality is working only sticky footer but do not load additional posts. This footer seems not working on posts page (single) and also not loading next posts.

    Example: https://overwatchleague.pl/news/london-spitfire-reprezentant-europy-koreanskim-wydaniu/

    So I’ve added support for IS in my function.php:

    function ow_jetpack_setup() {
        add_theme_support( 'infinite-scroll', array(
            'container' => 'art',
            'footer'  =>  'footer',
            'render' => 'ow_render_infinite_scroll',
        ) );
    }
    add_action( 'after_setup_theme', 'ow_jetpack_setup' );

    Then in single.php I’ve tried to get this working:

    <?php get_header(); ?>			
        <!-- BEGIN .content -->
        <div class="container">
    	<div id="art">
    		<?php
    		function ow_render_infinite_scroll() {
    			while (have_posts()) {
    				the_post();
    				$post_type = get_post_type();
    				get_template_part( 'content', $post_type );
    			}
    		}
    		?>
    	</div>
        </div>			
    <?php get_footer(); ?>

    Of course header.php has added wp_head inside and footer.php has added wp_footer.

    But with that function IS is not working and also content is not showing with template from file content-single.php – it’s showing blank div. When I comment function content is showing but IS is still not working.

    What am I doing wrong?

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi there! I see that Jetpack is having troubles connecting with your site, first off. Can you please disconnect and reconnect it again for me? That should fix the initial problem.

    Let me know when you’re done with that so we’ll be able to dig into the IS issue even better. Thanks!

    Thread Starter siomerro

    (@siomerro)

    Hi Stef,

    thanks a lot for contact. I have disconnected jetpack and activate it again. Can you check if there are no connecting problems?

    So I’m waiting for tips for a solution.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Still connection problems happening, @siomerro! ??

    Shall we try a full plugin deletion and reinstallation?
    Let me know when you’re done and we’ll take it from there.
    Thanks!

    Thread Starter siomerro

    (@siomerro)

    Hi Stef,

    ready to go. I deactive plugin, delete and reinstall.

    M<aybe this will be helpfull. My wordpress is working on multisite functionality.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    @siomerro we’re still having troubles connecting Jetpack to your site! There are a number of things I’d like you to try, but not sure if you prefer to test it privately? We could share more private data that way.

    If you’re happy with that you can contact us here (please mention this thread!) or otherwise we can keep discussing it here.

    Thread Starter siomerro

    (@siomerro)

    Stef,

    sure. I was already sent support ticket. I’m waiting for contact and will be gratefull to continue solving my problem ??

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Awesome! We’ll take it from there then ??
    Thanks!

    I’m having the same problem over at worldinsport.com

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Infinite scroll not loading posts’ is closed to new replies.