I’m having issues getting the Prolio theme behaving the way I’d like. In essens I’ve a div which contains a number of portfolio-thumbs which are being fed from the wordpress framework. This div, however, only allow up to 3 portfolio thumbs on one row - and since I’ve changed the normative size of these thumbs I’d like to display more than 3 portfolio thumbs on one row.
I’m fairly new in php, but I think I’ve located where the problem is:
[php]<?php
$featured_title = get_option('dt_featured_title');
$featured_number = get_option('dt_featured_number');
$query = new WP_Query(array(
'post_type' => 'portfolio',
'posts_per_page' => $featured_number
)
);
$total = $query->post_count;
$i = 0;
$o = 1;
?>
<div class="title-wrap">
<h3 class="title"><span><?php echo stripslashes(htmlspecialchars_decode(nl2br($featured_title))); ?></span></h3>
</div>
<?php if ($query->have_posts()) : while ($query->have_posts()) : $query->the_post(); ?>
<?php if(dt_is_multiple($i, 3) || $i == 0) : ?>
<ul class="clearfix">
<?php endif; ?>
<!--BEGIN .hentry -->
<li <?php post_class(); ?> id="featured-post-<?php the_ID(); ?>">
<!--BEGIN .featured-image -->
<div class="featured-image clearfix">
<a href="<?php the_permalink(); ?>">
<span class="overlay"></span>
<?php dt_image(140,105); ?>
</a>
<!--END .featured-image -->
</div>
<h2 class="post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<!--BEGIN .post-content -->
<div class="post-content">
<?php
if ( !empty( $post->post_excerpt ) ) {
the_excerpt();
}
?>
<!--END .post-content -->
</div>
<!--END .hentry-->
</li>
<?php if(dt_is_multiple($o, 3) || $o == $total) : ?>
</ul>
<?php endif; ?>
<?php $o++; $i++; endwhile; endif; ?>[/php]
I would say that the [php]<?php if(dt_is_multiple($i, 3) || $i == 0) : ?>[/php] is setting up the appearance of an ul class=clearfix which holds the portfolio-thumbs…
My problem is no matter what I do to above string, I cannot get the desired response (ie. having 4 or more portfolio-thumbs on one row - while still holding flow and context of the site)
This is how it looks:
http://gmtn.dk/issue.jpg