Sticky posts are ignored
PSMJonas opened this issue · comments
Jonas Lörken commented
Description
When I mark a post as sticky, it is not output first in the query.
I read in another issue that by default $query_args['ignore_sticky_posts']
is set to true
.
I have disabled this:
add_filter('graphql_post_object_connection_query_args', function($query_args, $source, $input) {
$query_args['ignore_sticky_posts'] = false;
return $query_args;
}, 10, 3);
Unfortunately this did not change anything.
Steps to reproduce
- mark a post as sticky.
- Output a query with posts.
- The sticky post is not output at the top.
Additional context
No response
WPGraphQL Version
0.12.2
WordPress Version
6.3.2
PHP Version
8.1
Additional environment details
No response
Please confirm that you have searched existing issues in the repo.
- Yes
Please confirm that you have disabled ALL plugins except for WPGraphQL.
- Yes
- My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
Jason Bahl commented
Jonas Lörken commented
I saw that, but there doesn't seem to be a solution currently.
Dovid Levine commented