Hey @kaichi
You can use our query_args
filter, to modify the query, found here:
https://customlayouts.com/documentation/action-filter-reference/
And combine it with the info from this stack exchange post:
https://stackoverflow.com/a/19814472/459359
And you should end up with code that looks like:
function layout_query_args( $query_args ) {
// Get sticky posts from DB
$sticky_posts = get_option('sticky_posts');
if ( ! empty( $sticky_posts ) ) {
// Modify the query
$query_args['post__in'] = $sticky_posts;
}
// Always return in WP filters
return $query_args;
}
add_filter( 'custom-layouts/layout/query_args', 'layout_query_args', 10 );
Note- I didn’t get to test this – but in principal everything looks correct.
Best