Random featured images in a widget
Hi,
Each post I make has a nice little handcrafted featured image to go with it. I want to to put (say) 10 stacked random images in the sidebar (no text, just the thumb with some canvas around it), resized to 150x75 and clickable to take someone to the post it represents. In the last week I must've tried every widget that has anything at all to do with featured images and the sidebar, but I still cant find anything. I found one (special recent posts) which does EXACTLY what I want, but it only takes its images from the last X recent posts. I contacted the author and asked if he could tell me how to make it choose from all blog posts, not just the last few. He said it stretched the plugin too far and he had no plans to implement anything like that :( The closest thing I've found myself is to use the php widget (mentioned elsewhere in this forum) and use the following Code:
<?php Can someone either suggest a plugin I could try that does what I want, or failing that give me some ideas of how to go about getting this code to work as I want? Thanks :) EDIT I've managed to work out that putting this as a css insert will place it where I want it, and resize the image, but it doesn't do a 'proper' job - images seemed squashed or stretched to fit. There must be a better way :( Code:
img.wp-post-image { Edit 2 Ok, I've realised that you cant really use CSS to resize an image. The widgets that do resize use routines and methods that are beyond me. I've manually resized the thumbs to the size I need, and using the bit of php and css from above I've got a passable result :) Hope that helps someone else |
All times are GMT -6. The time now is 09:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.