Wordpress plugin ændring
Hej...Bruger et WPPA galleri med mit wordpress, men prøve på at få noget ændret så det passer til mit brug... Er ikke skarp til PHP, så kan ikke få en løkke fjernet fra scriptet
<?php if (wppa_page('albums')) { // if is albums list page ?>
<?php $alt = ''; ?>
<?php foreach (wppa_get_albums() as $ta) : global $album; $album = $ta; ?>
<div class="album2 <?php echo $alt; ?>">
<div class="image_boks2"><a href="<?php wppa_image_url(); ?>" rel="lightbox[<?php wppa_album_name(); ?>]" title="<?php wppa_the_album_name(); ?>"><img src="<?php wppa_image_url(); ?>" alt="<?php wppa_the_album_name(); ?> " title="View <?php wppa_the_album_name(); ?> " class="image2" /></a> </div>
<h2 class="name2">
<?php wppa_the_album_name(); ?>
</h2>
<p><?php wppa_the_album_desc(); ?></p>
</div>
<?php if ($alt == '') { $alt = 'alt'; } else { $alt = ''; } ?>
<?php endforeach; ?>
<div class="clear"></div>
<?php } else if (wppa_page('thumbs')) { // if is showing thumbs for an album ?>
<h1 class="posttitle">
<?php wppa_album_name(); ?>
</h1>
<br />
<div class="thumbs">
<?php foreach (wppa_get_thumbs() as $tt) : global $thumb; $thumb = $tt; ?>
<a href="<?php wppa_photo_page_url(); ?>" rel="lightbox[<?php wppa_album_name(); ?>]" class="img"><img src="<?php wppa_thumb_url(); ?>" alt="<?php wppa_album_name(); ?>" title="<?php wppa_album_name(); ?>" /></a>
<?php endforeach; ?>
<ul>
<li>Back to</li>
<?php wp_list_pages('sort_column=menu_order&title_li=&include=5'); ?>
</ul>
</div>
<?php } else if (wppa_page('single')) { // if is showing a specific photo ?>
<br />
<div class="prevnext">
<?php wppa_prev_next('<div class="prev">«<a href="%link%">Previous Photo</a></div>', '<div class="next"><a href="%link%">Next Photo</a>»</div>'); ?>
<div class="clear"></div>
</div>
<a href="<?php wppa_photo_url(); ?>"><img src="<?php wppa_photo_url(); ?>" alt="<?php wppa_album_name(); ?>" title="<?php wppa_album_name(); ?>" class="big" <?php echo wppa_get_fullsize(); ?> /></a><br />
<h3 class="imagetitle">
<?php wppa_photo_name(); ?>
</h3>
<p class="imagedesc">
<?php wppa_photo_desc(); ?>
</p>
<?php } ?>
Den kode viser alle gallerier, men vil have at den kun skal vise det nyeste, så håber nogen kan hjælpe mig med at rette det til!
På forhånd tak!
