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
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
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.