Elementor’s Grid Block (Free version) does not respect WordPress sticky posts by design. So unfortunately there’s no native setting to keep one post fixed at position 1.
You have 3 possible approaches:
1) Use Elementor Pro → Custom Query ID (cleanest solution)
2) Use two separate grids (one sticky + one latest posts)
3) Or modify the query via custom PHP (advanced solution)
If you’re comfortable with custom code, I can share a PHP snippet that forces sticky posts to appear first using pre_get_posts.
Hey Pouya – I’d appreciate that! Thanks!
Sure 🙂 here’s a clean way to handle it.Since Elementor’s Grid Block doesn’t respect WordPress sticky posts by default, we can modify the query and force sticky posts to appear first. If you’re comfortable adding a small PHP snippet, add this to your theme’s functions.php (or a Code Snippets plugin):
/**
* Elementor Grid Block – force sticky post to stay first
* Position 1 = sticky
* Positions 2+ = latest posts by date DESC
*/
add_action( 'elementor/query/posts', function( $query ) {
// Get WordPress sticky posts
$sticky_posts = get_option( 'sticky_posts' );
if ( ! empty( $sticky_posts ) ) {
// Include sticky posts and show them first
$query->set( 'post__in', $sticky_posts );
// Order: sticky first, then newest posts
$query->set( 'orderby', [
'post__in' => 'DESC',
'date' => 'DESC',
] );
}
});
This forces:
- Position 1 → sticky post
- Positions 2+ → newest posts by date
Works with a single grid and updates automatically when you publish new posts.
If your grid uses a custom Query ID, replace “posts” with that ID.
Hey thanks! I don’t think it worked. Added the snippet. Then as a test, I went to a post that’s a week old, made it sticky, and the expected behavior was it would then be to the first position on the grid, but i wasn’t. 🙁
Thanks for testing it — your test makes sense 👍
The reason it didn’t work is that Elementor’s Grid Block doesn’t use the generic
elementor/query/posts hook. You need to use a custom Query ID so Elementor knows which query to modify.
Here’s the correct approach:
1) In the Grid Block settings:
- Go to Query → Advanced
- Set Query ID to: highlight_grid
2) Then add this PHP snippet:
/**
* Elementor Grid Block
* Force sticky post to always stay in position 1
* Requires Query ID = highlight_grid
*/
add_action( 'elementor/query/highlight_grid', function( $query ) {
$sticky = get_option( 'sticky_posts' );
if ( empty( $sticky ) ) {
return;
}
// Put sticky post first
$query->set( 'post__in', $sticky );
$query->set( 'ignore_sticky_posts', true );
// Order remaining posts by date
$query->set( 'orderby', [
'post__in' => 'DESC',
'date' => 'DESC',
] );
});
This way:
- Position 1 = sticky post
- Positions 2+ = latest posts by date
- Making an old post sticky will immediately move it to position 1
- Removing sticky restores normal ordering
Elementor Free doesn’t support this out of the box, so this is the cleanest solution.
Grrr! Still striking out:
Older post designated as ‘sticky.’
Proper category selected.
code in php snippet and live
Query ID to: highlight_grid
(actually, in my install it’s edit grid -> Content -> Devs: Query ID
And many thanks for helping with this.
Hi, thanks for checking and for the details.
This isn’t something you’re doing wrong. The Elementor Grid Block doesn’t use the normal elementor/query/posts hook, so PHP snippets can’t change its ordering. That’s why sticky posts are ignored even though everything looks correct on your side.
In Elementor Free, the Grid Block query is internal and can’t be modified to force a sticky post into position 1.
Unfortunately, the only reliable options right now are:
- Manually selecting the highlight post, or
- Using Elementor Pro (custom query), or
- Building a small custom loop/block.
So this is a limitation of the widget, not a config issue.
-
This reply was modified 1 month ago by
Pouya.
“Manually selecting the highlight post,” – I don’t mind doing that, but how do you keep it in the first position.
and are you certain the paid version will do what’s needed if I pick that option?
thanks!
1) Manually selecting the highlight post
With the Grid Block (Free), you actually can’t lock a post into position 1. You can select it, but the widget will still reorder everything by date. So manual selection alone won’t keep it first.
2) Elementor Pro
Yes — in Pro this is possible. You can use a Custom Query / Query ID and explicitly place one specific post first, then load the rest ordered by date. That’s exactly the use case Pro’s query hooks are meant for.
So to be clear:
- Free → not possible to reliably keep position 1
- Pro → yes, doable with a custom query
Hope that clears it up.