WordPress.org

Ready to get started?Download WordPress

Forums

Display current viewers web address in sidebar (1 post)

  1. sparkyjoe
    Member
    Posted 5 years ago #

    I keep trying to display a website address of people who have previously commented on my site into my sidebar but with no luck so far. I'm trying to use this code but I don't know what i am doing wrong.
    <?php
    $commenter_url = $wpdb->get_var("SELECT comment_author_url
    FROM wp_comments
    ORDER BY comment_author_url
    LIMIT 0 , 30");

    if(!empty($commenter_url)){
    echo "<center><b><font color=#cc66cc>Your web url is, $commenter_url!</font></b></center>";
    }else{
    echo "<center><b><font color=#cc66cc>No web url available!</font></b></center>";
    }
    ?>

    Please be patient with me as I am still trying to learn. Thank you for any help you can give.

Topic Closed

This topic has been closed to new replies.

About this Topic