• 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 - 16 through 30 (of 50 total)
  • My sticky post doesn’t work like it should. It’s ’sticks’ on top of the page when I pull up the category it is in. Also it ’sticks’ on top of the page when I pull up the month of January archives. But not on my main page. http://dark.unitz.ca/~stduval/blog/index.php I am using V 0.72 and went over LL’s detailed instructions like a thousand times. Help me please. I am at a loss.

    The above post is me… I decided to register.

    Thread Starter Laughinglizard

    (@laughinglizard)

    I see that you are using 0.72. My best suggestion would be to remove all of the hack and start over again. I cannot look at your code, but your error lies in your blog.header.php. I would look at that real close and check to make sure all the curly brackets close in the right place, etc. Unless you have made any serious changes to your blog.header.php, I would start with a fresh copy and re-apply the hack to it.
    Hope this Helps.
    Peace

    No luck! 🙁 Maybe I can send you the file so you can look at the code? Pretty please? lol. Just kidding. I will just remove the sticky tag option for now until I grasp a better understanding of PHP. Already in the last month I have picked up some. So maybe by next month I will be able to determine the problem. Thanks LL.

    Thread Starter Laughinglizard

    (@laughinglizard)

    Sure thing! Would love to help you out as much as I can.

    There are two contradictory assertions at the beginning of this thread. Read about them in this thread .
    Which statement is correct?

    OK, I must be blind because I don’t see any contradictions going on.
    BTW: the link in the above post broke on me. I think this should be the right link here: http://wordpress.org/support/index.php?action=vthread&forum=3&topic=2811&page=0&anchor=5%22
    TG

    OK, maybe these are not contradictory statements but they have confused me so perhaps you can explain:
    The first post in this thread states “It lets a blogger indefinitely leave a post on top of their WordPress blog”
    The next post states: “a sticky will stick on top of a current day only.”
    current day or indefinitely?

    Thread Starter Laughinglizard

    (@laughinglizard)

    “It lets a blogger indefinitely leave a post on top of their WordPress blog”
    … is correct. If it does not behave this way, there is a bug which needs to be fixed. Post bugs on here or through email.

    Thread Starter Laughinglizard

    (@laughinglizard)

    @nexia: point well taken, but no promises on when that will be available. I will, however, see what breaks it in 1.1

    LL,
    in your instructions you put:
    <i>Consequently, here is the php code to run from a webpage, if thats your cup of tea.</i>
    $sql = 'ALTER TABLE b2posts CHANGE post_status post_status ENUM( \'publish\', \'draft\', \'private\', \'sticky\' ) DEFAULT \'publish\' NOT NULL ';
    for a third option.
    since i don’t have the first 2, could you give me instructions on how to do this? i have no idea at all about mysql.
    thanks

    Hi all,
    I’m having the same problem as nexia, my sticky posts are lost to view. Had a look in PHPmyAdmin (2.5.5-pl1) and the “sticky” status doesn’t show in the wp-posts table. If I try to modify it in by hand or import a text file as described above but replacing “b2posts” by “wp-posts”, I get this error message :
    ALTER TABLE wp_posts CHANGE post_status post_status ENUM( ‘publish’, ‘draft’, ‘private’, ‘sticky’, ) DEFAULT ‘publish’ NOT NULL
    MySQL a répondu:
    #1064 – You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘) DEFAULT ‘publish’ NOT NULL’ at line 1
    I’ve had a look at the doc but I’m afraid I’m too much of a newbie to figure this one out. If anyone can help?
    This is the version n° : MySQL 4.0.16-standard
    Thanks.

    Thread Starter Laughinglizard

    (@laughinglizard)

    @andy91fr, Anon and nexia: There will be a new version of this hack soon (maybe sometime this week) But till then, try this MySql query:
    ALTER TABLE $tableposts CHANGE post_status post_status ENUM( ‘publish’, ‘draft’, ‘private’, ‘sticky’ ) DEFAULT ‘publish’ NOT NULL;
    Where $tableposts is the name of your posts table (wp-posts in Andy’s case) I believe Andy’s query is missing the ending ‘;’

    Thanks a lot, LaughingLizard, but I still get the same error message. Guess it’ll wait for the new hack.

    The status keeps changing itself back to “Publish” 🙁 It only works when I change the status manually through phpmyadmin. I use 1.0

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