I run a css gallery and I need to convert all the images in the gallery from a Custom Field to become the Featured Image.
Does anyone have any advice how I could do this?
Leave a Reply
You must be logged in to post a comment.
I run a css gallery and I need to convert all the images in the gallery from a Custom Field to become the Featured Image.
Does anyone have any advice how I could do this?
You must be logged in to post a comment.
OK, firstly, if you want to avoid TimThumb entirely and your images aren’t currently the right size, you’ll need to find a plugin that can batch resize your media library.
Once you’ve done that, we can attempt to automate the process of finding the attachment for each featured image (that is, the post entry in the
wp_posts
table), and setting the post thumbnail.Disclaimer
There is no guarantee that the code above will work, it’s purely based on the information I have gauged from your comments so far – it’s more of a suggestion than a one-stop solution.