-
Hi there
I found the code snippet below in another topic, and have tried to add it, as I am having problems with the page going to the top of the page when using the pagination buttons.
But I can’t get it to work. It worked when I used the old version of Query Loop.
But with GB 2.0 Query it doesn’t work.Do you have a solution?
add_filter(‘generateblocks_dynamic_url_output’, ‘custom_query_loop_pagination’, 10, 2);
function custom_query_loop_pagination($url, $attributes) {
if (!empty($url) && !empty($attributes[‘className’])) {
if (strpos($attributes[‘className’], ‘pagination-button’) !== false) {
$url = $url . ‘/#queryloop1’;
}
}
return $url;
}Thanks in advance/
Knud -
Hi there,
With GB 2.0, you do not need any PHP filter.
You just need to select the query block, and set Pagination type to instant.
-
wow, so easy 🙂
What an improvement – you guys are amazing…Thank you so much for your fantastic work…
-
You are welcome 🙂
Happy to hear that!
- You must be logged in to reply to this topic.