How I could made a sql query who retrieve all the sticky post in a wordpress database? This is because we use a new app over the old wordpress website database, and I don’t know where WordPress “store” the sticky attribute.

Thanks in advance

2 Answers
2

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 Reply

Your email address will not be published. Required fields are marked *