Archives thumbnail

From Photostand Wiki

Jump to: navigation, search
archives_thumbnail()

The archives_thumbnail function will display the exact thumbnail path. This function must be used within the archives loop.

Parameters

This function has no parameters.

Examples

In the archives.php page

Displaying thumbnails in the archives

<!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>Archives</title>

    </head>
    <body>

        <p>
	    <?php
    	    foreach(archives_array(50) as $article)
    	    { 
    	    ?>
     	    <img src="<?php echo archives_thumbnail(); ?>" class="thumbnail" />
	    <?php
    	    }
	    ?>
	</p>

    </body>
</html>

In this example, the archives_thumbnail function will simply display all thumbnail path in the source attribute of the img tag.

Personal tools