Sticky hack instructions originally written by Mark from Weblog Tools Collection as implemented by LaughingLizard - http://dinki.mine.nu/weblog Revised for Wordpress 1.2 and added custom icon by Marius Ooms - http://oomsonline.com Required steps: STEP 1: Modify Database STEP 2: Modify wp-blog-header.php STEP 3: Modify wp-blog-header.php STEP 4: Modify wp-admin/edit-form.php STEP 5: Modify wp-admin/edit-form-advanced.php STEP 6: Modify wp-admin/post.php DISCLAIMER: Always make a backup of your original files, your are about to modify core code. ________________________________________________________________________________________________________________________________ ###STEP 1###____________________________________________________________________________________________________________________ This hack requires a small change to be made to the database. (Offcourse there are different ways to modify your tables.) Using phpMyAdmin, find your database. Click on wp_posts (could be *anyprefix*_posts). Click on Structure Click on post_status Find the length/values column where the following line should be present: 'publish','draft','private','static' Just add ,'sticky' to the line so the final value looks like so: 'publish','draft','private','sticky','static' ________________________________________________________________________________________________________________________________ ###STEP 2###____________________________________________________________________________________________________________________ ==FIND: Around line 429 in wp-blog-header.php== if ($pagenow != 'post.php') { if ((empty($poststart)) || (empty($postend)) || !($postend > $poststart)) { $where .= ' AND post_date <= \''.$now.'\''; } $distinct = 'DISTINCT'; if ($use_gzipcompression) { // gzipping the output of the script gzip_compression(); } } $where .= ' AND (post_status = "publish"'; // Get private posts if (isset($user_ID) && ('' != intval($user_ID))) $where .= " OR post_author = $user_ID AND post_status != 'draft')"; else $where .= ')'; $request = " SELECT $distinct * FROM $tableposts $join WHERE 1=1".$where." ORDER BY post_$orderby $limits"; ________________________________________________________________________________________________________________________________ ==REPLACE: Replace with this== if ($pagenow != 'post.php') { if ((empty($poststart)) || (empty($postend)) || !($postend > $poststart)) { $where .= ' AND post_date <= \''.$now.'\''; } $distinct = 'DISTINCT'; if ($use_gzipcompression) { // gzipping the output of the script gzip_compression(); } } $where .= ' AND (post_status = "publish" OR post_status = "sticky"'; // Get private posts if (isset($user_ID) && ('' != intval($user_ID))) $where .= " OR post_author = $user_ID AND post_status != 'draft')"; else $where .= ')'; $request = " SELECT $distinct * FROM $tableposts $join WHERE 1=1".$where." ORDER BY post_status DESC, post_$orderby $limits"; ________________________________________________________________________________________________________________________________ ###STEP 3###____________________________________________________________________________________________________________________ ==FIND: Around line 483 in wp-blog-header.php== $comment_counts = $wpdb->get_results("SELECT ID, COUNT( comment_ID ) AS ccount FROM $tableposts LEFT JOIN $tablecomments ON ( comment_post_ID = ID AND comment_approved = '1') WHERE post_status = 'publish' AND ID IN ($post_id_list) GROUP BY ID"); ________________________________________________________________________________________________________________________________ ==REPLACE: Replace with this== $comment_counts = $wpdb->get_results("SELECT ID, COUNT( comment_ID ) AS ccount FROM $tableposts LEFT JOIN $tablecomments ON ( comment_post_ID = ID AND comment_approved = '1') WHERE (post_status = 'publish' OR post_status = 'sticky') AND ID IN ($post_id_list) GROUP BY ID"); ________________________________________________________________________________________________________________________________ ###STEP 4### ___________________________________________________________________________________________________________________ ==FIND: Around line 95 in wp-admin/edit-form.php== ________________________________________________________________________________________________________________________________ ==ADD: Add this below it== ________________________________________________________________________________________________________________________________ ###STEP 5###____________________________________________________________________________________________________________________ ==FIND: Around line 78 in wp-admin/edit-form-advanced.php==
Post Status
________________________________________________________________________________________________________________________________ ==REPLACE: Replace with this==
Post Status
________________________________________________________________________________________________________________________________ ###STEP 6###____________________________________________________________________________________________________________________ ==FIND: Around line 105 in wp-admin/post.php== if ('' != $_POST['saveasprivate']) $post_status = 'private'; ________________________________________________________________________________________________________________________________ ==ADD: Add this below it== if ('' != $_POST['saveassticky']) $post_status = 'sticky'; ________________________________________________________________________________________________________________________________ ###CUSTOMIZED ICON###___________________________________________________________________________________________________________ To insert a custom icon like here, oomsonline.com, make these addititons. ==FIND: Around line 39 (Default Install) in index.php==

________________________________________________________________________________________________________________________________ ==ADD: Add this above that line== post_status == 'sticky') echo '
'; ?> ________________________________________________________________________________________________________________________________ ==ADD: Add this below that line== post_status == 'sticky') echo '
'; ?> ________________________________________________________________________________________________________________________________ DISCLAIMER, DO NOT COPY AND PASTE CODE BELOW. This is how my entry section looks like. My index.php is very customized so it might not work for you: post_status == 'sticky') echo '
'; ?>
post_status == 'sticky') echo '
'; ?>
posted

Modify your style sheet, my entry looks like this: #sticky { background-image: url(../images/icons/sticky.gif); background-repeat:no-repeat; background-position: 310px 0px; height: 19px; } All done! Now to implement this hack, simply choose "sticky" as the post option in a post and it will show up on top of your blog no matter what time or date it is. To remove the sticky, simply edit the post and change the status back to publish.