Thread Starter
Jubawa
(@justinw0918)
Further, I am curious if there should be the load more button, even though there are no more posts to load; perhaps that is the bigger issue at hand?
Thread Starter
Jubawa
(@justinw0918)
Just a friendly bump to address these specific questions:
– Should infinite scroll show the ‘load more posts’ button, when it has reached the end? (I am guessing it shouldn’t based on this GitHub issue)
– If so, how can one go about showing a message such as “no more posts to load” after the user clicks the ‘load more posts’ button?
Should infinite scroll show the ‘load more posts’ button, when it has reached the end?
It shouldn’t display the button, no. Do you see that button when you switch to one of the default themes, like Twenty Fifteen?
Just a friendly bump to address these specific questions:
It’s worth noting that we reply to every thread from the oldest to the newest. Every time you bump a thread, it goes back to the bottom of the queue, so I’d recommend against it.
Thread Starter
Jubawa
(@justinw0918)
Thanks for the reply, Jeremy.
Do you see that button when you switch to one of the default themes, like Twenty Fifteen?
I tried with both 2012 and 2015 and it has the same behavior. You can see a gif of the behavior here. Please also note, I did not add_theme_support for infinite scroll for these themes, they seemed to work fine ‘out of the box’ with the module. With my theme I had to add support for infinite scroll, which I did like this:
function add_infinite_scroll() {
add_theme_support( 'infinite-scroll', array(
'type' => 'click',
'footer_widgets' => false,
'container' => 'post-container',
'wrapper' => false,
'render' => 'infinite_scroll_loop',
//'posts_per_page' => false,
) );
}
add_action( 'after_setup_theme', 'add_infinite_scroll' );
If there is anything else I can supply you with in order to help, please let me know.
It’s worth noting that we reply to every thread from the oldest to the newest. Every time you bump a thread, it goes back to the bottom of the queue, so I’d recommend against it.
Thank you for pointing that out; I was not aware of your response rates and I probably should have been more patient. I apologize for that.
I tried with both 2012 and 2015 and it has the same behavior. You can see a gif of the behavior here.
It’s interesting. Both themes do indeed support Infinite Scroll out of the box as we include compatibility files for all the default themes in Jetpack itself. However, 2015’s Infinite Scroll support doesn’t use the click type. It uses scroll, and Infinite Scroll should consequently be triggered as you scroll. That older posts button should never be displayed.
You can see it on my own site, for example:
http://jeremy.hu/tag/work/
Do you use any other plugins on the site where you ran that test with 2015? If so, could you try to deactivate them, one at a time, and let me know if one of these plugins affects Infinite Scroll?
Thanks!
Thread Starter
Jubawa
(@justinw0918)
However, 2015’s Infinite Scroll support doesn’t use the click type. It uses scroll …
That’s interesting; by default it is showing the click type. I deleted Jetpack (and it’s contents), re-downloaded it and did the same for the 2015 theme and the default behavior is still click.
I want the click behavior so this isn’t an issue for me, but I am curious now why this is the case.
Under the settings, I did not click scroll infinitely – I left that unchecked. I am showing 1 post at a time. Perhaps this makes click the type by default?
As far as other plugins go, there are no other plugins activated.
Under the settings, I did not click scroll infinitely – I left that unchecked. I am showing 1 post at a time. Perhaps this makes click the type by default?
Yes, that’s it. I forgot all about that option, my bad!
I still wasn’t able to reproduce though. Could you check it for yourself on my test site (ignore the post content, it’s random π )? You’ll need to go through 8 pages before to reach the end. If you experience the issue, could you let me know what browser you’re using?
Thanks!
Thread Starter
Jubawa
(@justinw0918)
You’ll need to go through 8 pages before to reach the end. If you experience the issue, could you let me know what browser you’re using?
I did not experience the issue on your website, which makes me think this is something to do with my WP install or perhaps the fact I am in a local MAMP environment. Could this be the issue?
I haven’t deployed the site yet, I am not even close to that point and I will be using a custom theme. I am thinking this will not be able to be ‘resolved’ until I have a link to give you; I’m not sure what else we can do:/
hm. I fired up my local WordPress install, and couldn’t reproduce the problem there either:
https://cloudup.com/ctfG08fj2_r
That local installation uses WordPress Master, and the latest version of Jetpack. I’m not sure what may differ between your installation and mine.
If you don’t use any other plugins, it could be linked to different permalink settings, maybe. What are your current permalink settings?
Thread Starter
Jubawa
(@justinw0918)
Currently I am using post-name for my permalinks.
Currently Jetpack is the only plugin activated, every other plugin is deactivated (I also removed them to test but had the same result).
I am not sure what else to try; I’d gladly screen share with you via Skype or something; but not sure if you’re that interested in this dilemma, haha (which is completely understandable). Also, I would not waste your time.
hm, that’s interesting, I can’t reproduce with such permalinks either.
At this point, it might be worth waiting until your site is live, and see if the problem occurs there as well? Who knows, it might disappear as soon as you try outside of your local environment! π
Let me know how it goes!