January 30th, 2006

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!

Posted in Blogging, Tip of the Week, Wordpress

  1. 12 Comments

  2. nibrok said...

    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

    Mar 17, 2006

  3. Andrew said...


    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.

    Mar 19, 2006

  4. Shane said...

    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.

    Apr 16, 2006

  5. SpaDario said...

    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! 🙁

    May 4, 2006

  6. isulong seoph said...

    Is there a way we can make the guestbook function like a shoutbox ? and shold be login before they can type a message ? thanks

    Jun 15, 2006

  7. Jimisola said...


    I would like to migrate my current home-made guestbook (http://www.jimisola.com/index.php?page=guestbook.php) to your WP Guestbook. Do you have any instructions on how to import a previous guestbook to your?

    A generic answer such as SQL table name and columns would be sufficient I believe.


    Oct 3, 2006

  8. Jimisola said...

    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!


    Oct 4, 2006

  9. Manuel Gil said...


    I was installed the guestbook. Really works.
    Thanks for your contribution.

    Mi blog: http://www.manuelgil.com.mx/puntomarconi

    Best regards.

    Oct 9, 2006

  10. Nimdil said...

    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:
    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 🙂

    Nov 13, 2006

  11. Reymos said...

    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!

    Oct 11, 2007

  12. Michael said...


    Can someone tell me how to PAGINATE this guestbook?

    Mar 18, 2008

  13. Marc said...


    Oct 4, 2008

Post a Comment