Thank you for a nice plugin.
The following deprecations are reported in the PHP8.2 and WordPress6.5.5 environment:
PHP Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /.../wp-content/plugins/infinite-scroll-block/build/infinite-scroll/render.php on line 6
The relevant code is below
$next_page_content = '';
$next_page_content = render_block_core_query_pagination_next($attributes, $next_page_content, $block);
$link = preg_match('/href="([^"]*)"/', $next_page_content, $matches) ? $matches[1] : '';
This seems to be because the $next_page_content passed to the second argument of the preg_match() function is null, not a string. The message disappeared when I corrected it as follows.
$next_page_content = '';
$next_page_content = render_block_core_query_pagination_next($attributes, $next_page_content, $block);
if ($next_page_content) {
$link = preg_match('/href="([^"]*)"/', $next_page_content, $matches) ? $matches[1] : '';
} else {
$link = '';
}
This is merely an improvement made in my environment, and it appears to work fine, but I would appreciate it if you could verify the code and make it available in the next version.
]]>I love the plugin, however, when I use it with the loop block to display WooCommerce products, I noticed that it disables the add to cart button link on products that load with infinite scroll.
It is not clickable and does not trigger the add to cart action. Attached is the link to the page where I am using it.
]]>Hi there,
Really love the plugin. Thanks for making it.
Any chance we can make the user go back to the exact post that has been clicked when returning to the post list?
Currently, when I scroll down all the way to, say, post 100 and then open said post, I’m being taken back to the very start of the query loop when returning to the original page.
Let me know!
Thanks!
]]>Will this work for single posts pages?
]]>When adding the Infinite Scroll Block to the loop, sticky posts are not excluded from subsequent requests. I tried to find where the development for this plugin is taking place (e.g. GitHub) in order to make a contribution, but was unsuccessful.
There are a few methods for ignoring sticky posts, but the best is to use the 'post__not_in'
parameter in the query, along with get_option( 'sticky_posts' )
.
Happy to make this contribution in a pull request, if you share the development repo for this plugin.
Thanks for all your hard work!
]]>Hey aPEDESTRIAN,
your plugin works like a charm unless the experimental feature “viewTransition API for navigations” is activated as a flag in chrome. Then it crashes the page. I understand that this may not be your fault and the viewTransition API is not official but I assume that it will gain traction fast and you might want to be prepared for the day it is activated by default.
So this isn’t really a bug but it may become one in the future.
I’m running Chrome 114.0.5735.90 (arm64) on a Mac.
Cheers, emmquadrat
Hi there, does this plugin work for categories? I’m seeing it pull through generic posts on a query loop set to inherit from the template?
]]>Hi,
Can you help me please?
I’ve installed the plugin but I can’t see block inside iditor.
And one more question. Does this block only works with Query Loop Block or it can be used separately? I have a long page with custom content. Can I just place Infinite Scroll Block somewhere on the page to delay the load of remaining part?
Thank you!
]]>Very good extension, works well in most cases, but I found an issue with list blocks.
Some times, the list flows out of the post :
I have a blog page with 2 columns and 4 items per page.
When there is a list block in post number 5, the list flows out of the block.
It’s ok if there is a list in block number 5.
I hope this will help you.
Thanks