How to retrieve sticky post in raw sql?

It’s not stored as attribute, but as list of all stickies. Snippet from core:

$sticky_posts = get_option('sticky_posts');

So look for the option and then use IDs to retrieve posts.

Leave a Comment

tech