Sticky post button and display sticky per individual user

The default sticky functionality stores the sticky post’s ID as an option value. You’ll want to do something similar, storing sticky IDs as user meta. Use the “option_sticky_posts” filter to fool WP_Query into thinking the user’s sticky selection is the site’s sticky selection by using the page owner’s values in place of the site’s.

Buttons don’t reflect a true/false state very well. I recommend using a check box field to indicate sticky status. The chosen state can be saved when the remark is first published. If the remark is already published, the sticky state could be changed via Ajax request triggered by the field’s change event.


Thank you for your response. I came up with this round-a-bout solution:

Created a ‘sticky’ category;
Users can select that category;
When displaying post, 1st post in sticky cat gets displayed on top of page for that specific user by checking cat and author id.

Works alright.

Thanks again;


Source link