How to Make A WordPress Guestbook?

Someone asked me how to make a guestbook in WordPress.

No, it doesn’t require a plugin.

Simply create a new page (Write Page) in your Admin Panel and call it ‘Guestbook’. Be sure to allow comments so that your visitors can ‘sign’ it.

Update: New, More Wonderful Instructions!

Another Update: WordPress Generator Plugin is a sparkly new plugin that does all the dirty work for you!

12 comments

  1. Ummm in response to “Creating a WordPress Guestbook”
    If you do your steps above this just creates a page called “Guestbook” with no way for anyone to “sign” anything. You have to somehow get comments and posts into this page..

    Could you please explain in more detail,

    Thank you

  2. Nibrok,

    If you read my instructions more carefully, I said, “Be sure to allow comments so that your visitors can ’sign’ it.” Click on my guestbook on the right side to see how it works.

  3. Of course, the other problem with this is spam. I am very serious about avoiding comment spam, so I would not “simply allow” comments on the page.

    I have a second blog that has comments completely closed except to contributors. This would not work at all on that blog.

  4. Hi! I tried to follow your instructions to make the guestbook but even allowing comments, nothing appears in the page, except the title and a few words I’ve written. No comment form! 🙁

  5. Hi again,

    I’m completely new to WP, so I did know anything about its database layout. It was VERY easy to understand, especially since you utilized post and comments for guestbook. I know how to migrate my old guestbook now.

    Great plugin!

    Thanks,
    Jimisola

  6. Hi,
    I suggest this modification of guestbook which adds the number of ‘comments’ to the link. It takes a little bit work but I think it’s nice anyway to have it.

    1. Make back-up of every file you’ll touch
    2. Enter Guestbook made with Plugin. It will look something like this:
    http://your.site.address/?page_id=X
    where X will be some number (for example – it is 8 for my site; you can check). Write X down.
    3. Create a file called “guests.php” and fill it with this:

    and modify it a little:
    localhost,user_name,password,database_name – parameters which are the same as in wp-config.php
    X – modify with the number noted previously
    4. Save the file and upload to your wordpress
    5. Now backup file template-functions-post.php in wp-includes directory and edit it. Search for a “get_pages” phrase.
    about 22 lines lower you will see s.t. like this:
    $pages = $wpdb->get_results(“SELECT * ” .
    “FROM $wpdb->posts ” .
    “WHERE post_status = ‘static’ ” .
    “$exclusions ” .
    “ORDER BY ” . $r[‘sort_column’] . ” ” . $r[‘sort_order’]);

    modify it adding ‘ID X and’ so it looks like this (of course – X is a number all the time):
    $pages = $wpdb->get_results(“SELECT * ” .
    “FROM $wpdb->posts ” .
    “WHERE ID X and post_status = ‘static’ ” .
    “$exclusions ” .
    “ORDER BY ” . $r[‘sort_column’] . ” ” . $r[‘sort_order’]);
    Save changes.
    6. OK, so we’ve done all dirty work. Now, we have only to place link to the guestbook somewhere.
    It looks like this (yes, again change X with the number noted earlier):

    Additionally, you can place link to guestbook wherether you want.

    My Blog is in Polish, but you can actually find a word “Guestbook” there: http://nimdil.net
    so you can see how it looks like 🙂

  7. Frankly, I dont need a guestbook page coz, every visitor could just possibly write any comment to any of my post or recent journal. Spam problem is not really a problem since all the messages are moderated by the owner, so every message will send a notice message to the owner thru his/her email address.

    Keep blogging!

Leave a comment

Your email address will not be published. Required fields are marked *