My favorites | Sign in
Project Logo
                
Search
for
Updated Jan 13, 2008 by Alakhnor
ThemeIntegration  
Basics of theme integration

Function list

Post-Thumb provides three main functions to adapt your theme:

You can set the parameters in the option screen for the entire site, or change them locally in any function call your theme template may contain using function parameters.

Using function parameters

Each function can be used with numerous parameters to manage display or how or where thumbnails are saved. You do not have to use them unless you want different settings from the default options you have choosen in the option screen.

Each parameter should be input with its value separated with '=' and separated from the other parameters with '&'.

Example: <?php get_recent_thumbs("WIDTH=100&HEIGHT=80&ROUNDED=1&LIMIT=12"); ?>

Simple examples

An entire loop:

<?php if (have_posts()) : ?>
	<?php while (have_posts()) : the_post(); ?>
		<div class="post">
			<div class="entry">
				<?php the_thumb('link=p&subfolder=loop&align=left&nodef&lb_effect=1'); ?>
				<?php the_excerpt() ?>
			</div>
		</div>
	<?php endwhile; ?>
<?php endif; ?>

This will display the post thumbnails using default options. In addition, it will:

A sidebar example:

<?php echo get_recent_thumbs("altappend=first-&width=180&height=120&category=1&offset=0&limit=1"); ?>
<?php echo get_recent_thumbs("altappend=main-&width=50&height=50&category=1&offset=1&limit=6"); ?>

First line will display the first (limit=1) post of category 1 with a size of 180x120. The save name will be: first-image.xxx.

Second line will display the 6 (limit=6) following (offset=1) posts of category 1 with a size of 50x50. The save name will be: main-image.xxx.


Sign in to add a comment
Hosted by Google Code