• Hi,

    After hours looking for a solution, in vain, I think I have to post this here and maybe some pro would kindly help me.
    I use the plugin “last-uploaded-images-widget” to have my 6 latest uploaded images appearing in my footer, and it works like a charm.

    My problem is quite simple for a pro I guess, I would like to set a default url (like ‘gallery’) for that content, so that when I click on one of these 6 dynamically called images, It would link to the set url (‘gallery’) and not the attachments…

    Here is my code :

    <?php
    					$args = array( 'post_type' => 'attachment', 'numberposts' => $count, 'post_status' => null, 'post_mime_type' => 'image' );
    					$attachments = get_posts($args);
    					if ($attachments) {
    							?>
    								<div class="attachment-widget-container">
    							<?php
    
    							foreach($attachments as $attach) {
    								$image = wp_get_attachment_link($attach->ID,array($width,$height));
    								echo $image;
    							}
    
    							?>
    								</div>
    							<?php
    					}
    				?>

  • The topic ‘Set one default url for my "last uploaded images" set’ is closed to new replies.