Support » Plugins » Sticky Post Hack – 0.72

  • I finally had the chance to finish the sticky posts hack for WordPress. Quite simple actually. It lets a blogger indefinitely leave a post on top of their WordPress blog. Here is the link to detailed instructions to install the hack. Let me know if there are any bugs!
    The instructions are detailed for WP 0.72. I will fix it for 1.0 once it is released officially.
    Peace

Viewing 15 replies - 1 through 15 (of 50 total)
  • LL, is all that’s required to update it to 1.0 is changing filenames? (b2->wp, etc) I’d like to try it out but I’m using the latest CVS, which is 1.0 pre-alpha, woohoo! 🙂

    The hack will need a little retooling and testing for 1.0 in addition to the changed filenames. The database selection structure for the main blog is a little different along with the post_status selection under the post edit page. The changes are in the sql that selects the posts (because post and edit use different pages now) and also in the way the radio buttons choose the post_status. I am sure this structure is going to change a bit before it hits a full release.
    BTW the new pre-alpha CVS looks really nice and has a lot of really nice new features! Good job Matt, Alex, Dougal, Mike and others!

    @laughinglizard =D Good Job.

    Thanks GamerZ!

    I changed my db and used the sticky post, everything works just great.
    What I’m wondering though, is there a way for it to NOT show the date at the top of the post? I just want to leave a message at the top that people can comment in about where they’re from, but I’d prefer if it didn’t have the date on it because that’s the first thing they see. Then they’ll think that there’s an old post there.
    Anyway to stop the date from just one post?

    Sure,
    Find this line (or an equivalent) in your index.php:
    <?php the_date(”,'<h2>’,'</h2>’); ?>
    and replace with these lines:
    <?php if ($post->post_status != ‘sticky’) the_date(”,'<h2>’,'</h2>’); ?>
    Hope it helps.
    Peace

    You are a genius 🙂 That works perfectly.

    Thanks Jackie….I only wish!!

    The sticky post hack now has the extra information needed to work in 1.0. Please let me know if there are any bugs.
    Peace

    LaughingLizard, I installed this great hack on 1.0 with no problems. Maybe you should make it clear in Step 1 that the first “==FIND==” is for 0.72 only, and not 1.0
    Thanks for the hack!

    Fixed. 🙂 Thanks for the heads up

    LaughingLizard, installed the hack on 1.0, everything looked ok – the ‘make sticky’ link shows up – then did some test posts as both superuser and tester (+1), and the supposed-to-be-sticky post slips right doen the page. any ideas why? thanks.

    Two things to check. If it does slip down, make sure you followed the instructions to put some extra information in your wp-blog-header.php (I am assuming you are using 1.0) If you did do it right, go into phpMyAdmin or its equivalent and see what post_status that entry is in. I have noticed that some posts will not get their post_staus changed until you edit (a bug onm y part probably) Email me if you still cannot make it work.
    Peace

    thanks laughinglizard (can i call you ll?) – i made it sticky via phpMyAdmin – do i now need to make some change in wp-blog-header.php so i won’t need to continue doing such in phpMyAdmin? and while we’re on the subject, can the ‘make sticky’ feature be made exclusive to superuser? i’m setting up a community blog, so i don’t want all +1s trying to ‘one-up’ one another!

    The instruction should tell you how to modify wp-blog-header.php
    As for the user level thing, it would take a little more code. Email me over the next couple of days and I will see what I can whip up. (might take me a while, school starts tomorrow!)

Viewing 15 replies - 1 through 15 (of 50 total)
  • The topic ‘Sticky Post Hack – 0.72’ is closed to new replies.