Main Image Div:
Code: Select all
<div class="main_image"><img src="<?php echo $p['image']; ?>"/></div>Code: Select all
<?php foreach( $posts as $p ) { ?>
<div class="post">
<?php if( $p['image'] ) { ?>
<a href="<?php echo $p['image']; ?>">
<img src="<?php echo $p['thumb']; ?>"/></a>
</div>
<?php } else { ?>Code: Select all
config.class.phpCode: Select all
public static $postsPerPage = 4;It works fine except when you initially load the page, no main image shows UNTIL you select a thumbnail. I tried adding this to the main DIV...
Code: Select all
<?php foreach( $posts as $p ) { ?>
<div class="main_image"><img src="<?php echo $p['image']; ?>"/></div>
<?php } else { ?>Code: Select all
<?php foreach( $posts as $p ) { ?>Code: Select all
public static $postsPerPage = 4;I am not a programmer, I am using bits and bobs of code from several sources so go easy on me.