Set one default url for my "last uploaded images" set
-
Hi,
After hours looking for a trick, in vain, I think I have to post this here and maybe some pro would 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
}
?> -
You did not specify a blog address or reason for posting when you created this topic.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
- The topic ‘Set one default url for my "last uploaded images" set’ is closed to new replies.