Unstick a post.
Sticky posts should be displayed at the top of the front page.
Signature
unstick_post( $post_id )
- post_id
- (int) Post ID.
Return
(void)
Source
function unstick_post($post_id) {
$stickies = get_option('sticky_posts');
if ( !is_array($stickies) )
return;
if ( ! in_array($post_id, $stickies) )
return;
$offset = array_search($post_id, $stickies);
if ( false === $offset )
return;
array_splice($stickies, $offset, 1);
update_option('sticky_posts', $stickies);
}
WP Trac GitHub Bitbucket
Link here
-
URL
http://queryposts.com/function/unstick_post/ -
HTML
<a href='http://queryposts.com/function/unstick_post/'>unstick_post()</a> -
Markdown
[unstick_post()](http://queryposts.com/function/unstick_post/) -
BBCode
[url=http://queryposts.com/function/unstick_post/]unstick_post()[/url]