WordPress.org

Ready to get started?Download WordPress

Forums

Keeping One Post First (9 posts)

  1. jbn10161
    Member
    Posted 9 years ago #

    I would like to have a "welcome" message as a permanently first post. Is that possible? If so, how? If not, would a static home page for the blog be the best way to go?

  2. Michael Bishop

    Posted 9 years ago #

    try a search for "sticky" or "adhesive"

  3. Kafkaesqui

    Posted 9 years ago #

    A number of solutions can be found listed here:

    http://codex.wordpress.org/Plugins/Posts_Miscellaneous

  4. jbn10161
    Member
    Posted 9 years ago #

    Thanks. I searched before posting, but not for either of those keys.

  5. amory
    Member
    Posted 9 years ago #

    You could also just do a custom loop with a query_posts, requesting the id or name of the post.

    <?php query_posts(p=1); ?>
    <?php query_posts(name=first-post); ?>

  6. jbn10161
    Member
    Posted 9 years ago #

    Re. query posts, I don't know PHP, and that page is blank. But thanks.

    Re. adhesive posts generally: I just d/l Adhesive 2.1 beta, but it seems not to work at all. My advanced editing options do not include the "sticky" choice. The author's web site, which in an obscure post he says contains his contact info at the bottom of every page, does not contain his contact info anywhere as far as I can tell.

    Would someone reading this please suggest some reasons why the plug-in does not work? (Yes, it's activated.)

  7. amory
    Member
    Posted 9 years ago #

    Sorry, i linked to the wrong page in the codex. It is the correct one now. To implement it, you can use either of the samples above, changing the value to whichever post you are requesting, and then adding in the loop as usual.

    <?php query_posts('p=1'); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    //DO STUFF HERE
    <?php endwhile; ?>
    <?php endif; ?>

    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    //Normal loop
    <?php endwhile; ?>
    <?php endif; ?>

    Please note this is untested as I am out the door, but this should work correctly.

  8. jbn10161
    Member
    Posted 9 years ago #

    Thanks amory. I am still trying to understand The Loop (WordPress is a humbling experience), and I'm wondering whether there would be advantages of your approach over the following, which seems like it addresses my issue:
    http://wordpress.org/support/topic/31735#post-205543

  9. Michael Bishop

    Posted 9 years ago #

    Make your post, then go back to edit it, and the make adhesive should be there. It is an odd anomaly, but, works as advertised afterword. What's nice about it is, unlike the query post option, is you can much easier swap what post is the sticky.

Topic Closed

This topic has been closed to new replies.

About this Topic