Forums

Last postings in sidebar? (2 posts)

  1. alansmith78
    Member
    Posted 4 years ago #

    Is it possible to list the latest postings in the guestbook in the main page sidebar?

    This way my guests can easily see the newest entries in the guestbook.

  2. DanielSchurter
    Member
    Posted 4 years ago #

    It's possible.
    Use the plugin Exec-PHP and write your desire SQL, PHP and CSS code in a widget textbox.

    like this one:

    <?php
    global $wpdb;
    $table_name = $wpdb->prefix . "dmsguestbook";
    
    $query = $wpdb->get_results("SELECT * FROM  $table_name");
    
    foreach ($query as $result) {
    echo $result->message . "";
    }
    ?>

    I will write a sidebar plugin in the near future.

    Daniel

Topic Closed

This topic has been closed to new replies.

About this Topic