What is the best way to store thumbnails for a non-image attachment?
What is the best way to store thumbnails for a non-image attachment?
What is the best way to store thumbnails for a non-image attachment?
Custom image sizes add to metadata
The problem is that even if there was such a function (I am not aware of one) all older links to those files would need to be updated as well. As links, src of images,… in the content of posts aren’t linked to the attachments in the DB but just HTML in the posts content … Read more
Clean up images, delete unused image sizes attached to a post type
I figured this out. It’s because the title isn’t part of the attachment metadata technically. The audio attachment itself is stored in the database as a post with a post type of attachement and applicable mime type. To update the title of the audio is to update the post title
How will you represent the galleries on the new site? Will each gallery be a post with a standard shortcode? If so, you’ll basically only need the url for each image on the old site (plus post heading/text and image descriptions if needed), and you can create a WXR import file to import everything into … Read more
Considering WordPress Codex, and WordPress Template Hierarchy – attachments stores as post records. Your code is making a loop redirection to the same page. The most reasonable case is: Your $post->post_parent equal to 0. If you’ll make a var_dump(get_permalink($post->post_parent));, youll notice that the output would be the same page url.
Query to only return the 2 newest post attachments (images)?
No, at the point where the wordpress functions are being invoked it is too late to worry about the upload time as the file was already uploaded. If you want to make the file smaller before it is uploaded you will have ti write your own code to do it in JS.
Set Attachment Image File URL as GUID