The following is code for a WordPress slideshow. The images are added through custom fields. I would like to be able to add a different link (or no link) to each of the slides. The current code is below, any tips on how to do that? The theme is quite old.

Thank you!!

        /* reading the custom field value 'headerImage'
            * muliple 'headerImage' image will cause js transition
            * if no 'headerImage' found then display default-header.jpg
        $headerImages = get_post_meta($post->ID, "headerImage", false);
            <!--photo starts-->
        <div class="photo noprint">
            <div id="fx" class="big-image">
                <?php if( is_array( $headerImages ) && count( $headerImages ) > 0 ): for( $i=0; $i<count($headerImages); $i++ ): ?>
                    <img src="<?php echo $headerImages[$i]; ?>" alt=""<?php if($i != 0) echo ' style="display:none;"'; ?> />
                    <?php endfor; else: ?>
                        <img src="<?php bloginfo('template_url'); ?>/images/default-header.jpg" alt="" />
                <?php endif; ?>

Read more here: WordPress PHP custom field - Individual links for slideshow


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , , , ,

Wordpress related questions and answers: