Plugin Support
ying
(@yingscarlett)
Hi there,
Your link leads to a 404 page, can you check?
The Page is … weiterer… and the blog starts with offset 5.
Thanks
Plugin Support
David
(@diggeddy)
Hi there,
hmmm…. we copied out what WP did with the core Query Loop block to resolve the offset issue. But it looks like that fix didn’t work either.
Try adding this PHP snippet to your site:
add_filter('found_posts', 'myprefix_adjust_offset_pagination', 1, 2 );
function myprefix_adjust_offset_pagination($found_posts, $query) {
//Define our offset again...
$offset = 5;
//Ensure we're modifying the right query object...
if ( ! is_admin() && $query->is_main_query() ) {
//Reduce WordPress's found_posts count by the offset...
return $found_posts - $offset;
}
return $found_posts;
}
and adjust the $offset = 5; to the required value.
I had a chance to check out the snippet. But as far as I was able to control it did not work.
Plugin Support
David
(@diggeddy)
Ok, so the static page will pose an issue.
For testing try this:
add_filter('found_posts', 'myprefix_adjust_offset_pagination', 1, 2 );
function myprefix_adjust_offset_pagination($found_posts, $query) {
//Define our offset again...
$offset = 5;
//Ensure we're modifying the right query object...
if ( ! is_admin() ) {
//Reduce WordPress's found_posts count by the offset...
return $found_posts - $offset;
}
return $found_posts;
}
Let me know if that works
Hi there! We haven’t heard back from you for a while now so we’re going to go ahead and set this topic as resolved. Feel free to open a new topic if you need assistance with anything else GB free related.
Sorry for answering so late – forgot it. This proposal worked very well.
Plugin Support
David
(@diggeddy)
Glad to hear this worked.