Comments website

From Photostand Wiki

Jump to: navigation, search
comments_website()

The comments_website function will return the current comment author's website url. This function must be placed within the the Comments_array loop.

Parameters

This function has no parameters.

Examples

Displaying the comments website url

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>

	<title>Article</title>

    </head>
    <body>

        <ul>
	    <?php
    	    foreach(comments_array('DESC') as $comment)
    	    { 
    	    ?>
     	    <li><a href="<?php echo comments_website(); ?>">Visit the website</a></li>
	    <?php
    	    }
	    ?>
	</ul>

    </body>
</html>

In the example above, an external link pointing toward the poster's website will be displayed for each comment.

Personal tools