• Resolved Rough Pixels

    (@roughpixels)


    I am adding Jetpack support to an older theme and although I have infinite scroll working, my blog navigation is still showing after the initial batch of posts. Is there something I missed or is there a PHP conditional to not load the blog nav when Infinite Scroll is enabled?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Bruce (a11n)

    (@bruceallen)

    Happiness Engineer

    Could you please post your site URL here so that we can have a look?

    If you want it to remain private, you can also contact us via this contact form. If you choose to reach out directly, please include a link to this thread.

    Thanks!

    Thread Starter Rough Pixels

    (@roughpixels)

    I would post the URL, but I’m working on this locally on my computer via XAMPP.

    Basically, I am looking for an “if/else” method to conditionally prevent the blog navigation from loading if Infinite Scroll is enabled. My nav is based on:

    the_posts_pagination();

    …page numbered.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hey @roughpixels,

    With no URL to check on this, it’s a bit tricky for us to troubleshoot your question ??

    However, can you check whether you have widgets in your footer at all? If you want posts to load as you scroll down, you can place widgets in an alternative widget area, such as the sidebar. If your theme has only footer widget areas, you may wish to look for a different theme with more widget area options.

    Let me know if that’s your case – thanks!

    Thread Starter Rough Pixels

    (@roughpixels)

    Thank you for the follow-up. However, I think you might have misunderstood my original request/question…

    I’m not referring to the footer or widgets, but in my theme, I have numbered pagination set up for navigating the bog (as in newer posts vs previous posts). The infinite scroll loads below that and the navigation is not nulled (removed).

    In the PHP file for my index.php which has the structure of the blog layout, the navigation is there (which uses the the_posts_pagination(); method). Basically, I’m wondering if there is a PHP if/else statement that can be used to create a conditional where the infinite scroll in Jetpack is enabled, the blog navigation won’t load.

    …I’m not sure why seeing the front-end of the website is relevant when this is in relation to PHP coding for a conditional statement. Again, this has nothing to do with a footer or widgets.

    Plugin Contributor Stef (a11n)

    (@erania-pinnera)

    Hi again, @roughpixels,

    In the PHP file for my index.php which has the structure of the blog layout, the navigation is there (which uses the the_posts_pagination(); method). Basically, I’m wondering if there is a PHP if/else statement that can be used to create a conditional where the infinite scroll in Jetpack is enabled, the blog navigation won’t load.

    Have you checked our Infinite Scroll support page about that?

    There’s a snippet that hides the navigation links:

    /* Hides navigation links and site footer when infinite scroll is active */
    .infinite-scroll #navigation,
    .infinite-scroll.neverending #footer {
     display: none;
    }

    But, again, as it’s tied with footer settings I’m not sure if this is something useful for you. Can you give it a look and let me know?

    Thanks a lot for the cooperation and patience ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Conditional for Infinite Scroll?’ is closed to new replies.