[ad_1]
Hi there,
you need the code from here:
https://generatepress.com/forums/topic/query-loop-pagination-any-way-to-reload-in-place-if-a-query-loop-is-lower-down/#post-2364321
Thats a PHP snippet.
If you’re using a Child Theme on your site, then you can add it to its functions.php
If you’re not then install the Code Snippets plugin and create a new snippet to add the code.
Thank you, it does indeed work!
However, I found out if you add an other CSS class than the one from the php code, it won’t work. I just have to define a seperate class for previous and next, though.
Thank you again.
Try this PHP Snippet instead:
add_filter( 'generateblocks_dynamic_url_output', function( $url, $attributes ) {
if ( isset($block['attrs']['className']) && strpos($block['attrs']['className'], 'custom-next') !== false ) {
$url = $url . '#my-loop-id';
}return $url;
}, 10, 2 );