We have sorted out where to keep the user comments, so now we can move onto the comment form and user input.
Since we already have our widget set up, the next step will just involve editing the wp-wall-widget.php
file and inserting the HTML for the form.
We want the form to have two fields: one for the name and the other for the comment text. Users who are logged-in will be recognized, and their name will be filled-in automatically.
To create our form, we will simply edit the HTML of our widget file.
Edit the
wp-wall-widget.php
file and replace the 'Hello World!' code with the following code:<div id="wp_wall"> user inputhandling<div id="wall_post"> <form action="#" method="post" id="wallform"> <?php if ( $user_ID ) : ?> <p>Logged in as <a href="<?php echo get_bloginfo('wpurl'); ?>/wp-admin/profile.php"> <?php echo $user_identity; ?></a>.</p> <?php else : ?> ...