Search the Community
Showing results for tags 'permalink'.
-
Hi, I am trying to customise some php code in a wordpress theme - the developer has left the planet and need to find a solution. This is the current code: <?php if ( $i < 3 ) { echo '<li class="margin_r"><div class="port_tn"><a href="'; echo the_permalink(); echo '" >'; echo the_post_thumbnail( array(40,40, true, "title" => "")); echo '</a> </div></li>'; $i= $i+"1"; } else { echo '<li class="no_margin"><div class="port_tn"><a href="'; echo the_permalink(); echo '" >'; echo the_post_thumbnail( array (40,40, true, "title" => "")); echo '</a> </div></li>'; $i = "0"; } ?> When the thumbnail is clicked it goes to the portfolio page. WHAT I WANT IT TO DO: I want it to open up the featured image of that portfolio post and open a pretty photo lightbox gallery instead. Skipping the single portfolio page. I then change the code to this code: <a href="<?php echo $image[0]; ?>" rel="prettyPhoto[portfolio-gallery]">'; echo the_post_thumbnail( array (40,40, true, "title" => "")); echo '</a> this now does skip the portfolip page and opens the prettyphoto lightbox, but then says it cant find the image or the url is incorrect. Please could you assist in amending the code to make this work the url of the website is: http://www.hayleyclarke.co.za/website/