WordPress.org

Support

Support » Miscellaneous » For those who need a “sticky” sort of message

For those who need a “sticky” sort of message

  • at the top of the blog page, here’s another way to do it without resorting to a plugin:

    Create a file within your theme folder; name it sticky.php or whatever. In the file put whatever it is you want to see at the top of your post listing. Use or whatever html you need to make it display right, and set up css IDs and classes in the theme’s style.css to help. Don’t put anything like a doctype etc. though.

    Then in your theme’s index.php file, use this line

    <?php include (TEMPLATEPATH . "/sticky.php"); ?>

    just outside The Loop.

    This might work for those having problems with adhesive, for instance….

Viewing 15 replies - 1 through 15 (of 19 total)
  • Daisyhead
    Member

    @daisyhead

    So you’d have to update that file (sticky.php) instead of creating an entry? That unfortunately isn’t going to work with my blog. I used Adhesive to make an entry “stick” at the top of my entries. If I did what you suggested, I would have to manually create the entry within that file just to get it to show and then it wouldn’t reside in WP, which kind of defeats the purpose.

    I don’t understand why Adhesive doesn’t work with 2.0.5 but appears to work with 2.0.6. I don’t want to upgrade to the latest version until I know it’s a bit more stable. I’ve read that a lot of people are having plugin issues and more. I guess I’ll just have to wait until someone updates the plugin or creates a new one.

    It would be really nice if this was a built-in feature eventually.

    Someone posted on here a while ago that there’s a version which works with 2.0.5 – you might do a search for it.

    Daisyhead
    Member

    @daisyhead

    Really? Hm. I just upgraded Adhesive to V3.2 and that doesn’t work with WP 2.0.5 and I didn’t see anything when I was searching through the forums this morning. I guess I’ll take another look. Thanks!

    Well, another workaround might be this:
    use the get-a-post plugin
    http://guff.szub.net/2005/01/27/get-a-post/
    You can get a post or a Page with it.

    What I did once: put the plugins tag in the index/home page [get_a_post(666)] and this was a Page (excluded from showing up in the menu) – whenever that content needed to be changed, just edited/updated the Page #666.

    Not perfect, but it works.

    Well, IIRC, that was the version whoever it was posted worked with 2.0.5, so it’s probably not worth your time searching. I don’t as a matter of fact know of anyone who’s got it working with 2.0.5, and Owen seems to have dropped development….

    Daisyhead
    Member

    @daisyhead

    I can’t seem to find a version of Adhesive that actually works with WP 2.0.5 and I’ve searched through the forums extensively. I know the first version of the plugin I used was 2.1 and that didn’t work with WP 2.0.5 and the version I am using now is 3.2 and it doesn’t work. I’m wondering if there’s a version in between the two that works??

    No clue. If I were you, I’d do it the “hard way” right now, and then go back to normal when you feel safe with 2.0.6, or just wait for 2.1 which should be along before too much longer.

    Daisyhead
    Member

    @daisyhead

    Does Adhesive work with 2.0.6 though? Hm. This stinks because that was one plugin that I really used a lot. I’m surprised no one has given it a go to see if there is a way to make it compatible with 2.0.5. It seems like a lot of people use this plugin. I think I’ll look into Mushu’s suggestion and see if I can get that to work for now.

    Are you changing stickies a lot? Is that the problem?

    Daisyhead
    Member

    @daisyhead

    No, but I use posts as stickies to keep them at the top of a page. If you check out my blog (www.daisyhead.org) now, the entry that is at the top, I would like to make a sticky so it will stay on top after I continue to post other entries. There are times when I use the Adhesive plugin a lot and other times when I don’t, but it is one plugin I really grew to depend on. That’s why it kind of sucks that it doesn’t work now that I’ve upgraded from 1.5.x even though I know I needed to upgrade for security reasons.

    frenchvanillacoffee
    Member

    @frenchvanillacoffee

    Am about to try the sticky.php alternative but have no clue where “The Loop” is ….

    frenchvanillacoffee
    Member

    @frenchvanillacoffee

    (Been playing around with where to post it and so far it now appears between every single post …. at least I learned how to do that!)

    I have Adhesive on my blog, but I think it’s corrupted. I don’t have any sticky posts, but it’s enabled. If I deactivate the Adhesive plugin, I get a 500 server error on my blog. It’s only on the pages with posts though. Which unfortunately includes the home page of course, and any blog post. The pages don’t seem to affected. I was thinking about just deleting the plugin, but I’m worried that it might kill my blog. If anyone has suggestions, please let me know.

    Thank you!

    putting a <?php include …

    into my template, breaks my template execution. I’ve tried that before, don’t work.

    ..and yes I put it outside the loop, just after the body tag to be exact, right after the header stuff.

    besides, I didn’t create my template, someone else did, so I don’t have a clue how to style a .php file look like an entry up on top. I have no idea what styling he used for that.

    I’m using the “simple green” template

    personally, I think this should have been written into WordPress anyway.. like under the wite post page somewhere.

    to sticky a post. like put it in the write post page, on the right side there. I don’t think that option would be asking too much at all.

    but thats just my opinion.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘For those who need a “sticky” sort of message’ is closed to new replies.