WPG2 Wordpress: Generating Horizontal Image-Block

cryptess

Joined: 2003-06-26
Posts: 2
Posted: Sun, 2007-02-25 22:05

Using: Wordpress, WPG2 Plugin, Gallery2.

I'd like to generate a horizontal row of the latest 5 thumbnails across the header of my WP art blog at http://www.cryptie.net. Unfortunately, I'm not much of a script guru. Another user asked this question on the WPG2 Forums, to which the responses were: 1) Check the CSS Layout Tips and Tricks, or 2) Maybe it's a setting in Gallery itself.

If I can figure this out, I'll pass it on and several people will be very pleased. Thoughts?

--crypt

 
cryptess

Joined: 2003-06-26
Posts: 2
Posted: Wed, 2007-02-28 08:49

OK. My friend Shonn went in and took this code:

Quote:
<!-- WPG2 random image block -->
<?php $blocktype = 2; // 1 for single image, 2 for grid block
if (function_exists ('g2_sidebarimageblock') && ($blocktype != 0)) { ?>
<div class="sb-random">
<ul style="display: block; margin-left: auto; margin-right: auto; text-align: center;">
<?php if ($blocktype == 1) { print g2_sidebarimageblock();
} else if ($blocktype == 2) { print g2_sidebargridblock();
} ;?>
</ul></div>
<?php } ;?>

from sidebar.php, put it in the appropriate place in header.php, and turned off the display in the sidebar.

In order to make them horizontal, he tweaked the CSS a bit:

Quote:
.sb-random .one-image {
display: inline;
}