exposing attachment uploading to the front end — delicate
i’m probably breaking a few common sense rules here.
i’m probably breaking a few common sense rules here.
Is there any way I can take a URL of an image and find the attachment or post id of that image in the database?
I am using register_taxonomy_for_object_type() to add the Category taxonomy field to Media uploads (attachments). I’m using this code to do so:
I am trying to do something similar to the above question. I am trying to make users post and upload images from front-end. I have already done the post form and its working.
How can I change the format of attachment page urls from /[post-url]/[attachment-name]/ to /media/[attachment-name]/? I understand that I can override the output of get_attachment_link via the attachment_link filter, but I guess I need to change the redirect structure so WordPress knows how to handle these urls?
I am using an attachment.php file to show large versions of images that have been clicked on elsewhere. I’d like to pull the image alt text as a caption under the image with javascript, but the alt text isn’t included when when wp_get_attachment_image_src() is used. I don’t think WP has a function to retrieve it, so I need my own. To write that function I need to know…Where is the alt text for an image stored?
Is there a function that allows me to change the filename of an attachment, based on the Attachment ID I have?
I have been struggling for days to figure this one out. I have successfully implemented a form to submit posts from the front end of my site. ButI can’t figure out how to make the image uploads work.
I have a restricted area on a website that can only be accessed by logged in users. For that I created a page template with a ‘current_user_can()’ condition.
I’m using this code to list the image attachments of a post: