The attachments tag has no wiki summary.
2
votes
0answers
293 views
Attachment 0×0 size error [closed]
My theme uses 8 different thumbnail sizes. I imported my local installation to the final server using phpmyadmin to export the wordpress database.
Everything is smooth except for the attachments: many ...
1
vote
1answer
628 views
How to remove attachments size attribute [duplicate]
Possible Duplicate:
Prevent Width and Height Attributes in Image Tag Output
i would like to remove the width="512" height="128" attributes on an attachments
this method is fine on images ...
1
vote
2answers
575 views
How to redirect 'file url' to 'post url' i.e. in attachment.php
I've just started using the attachment.php template on my site. What I'd like to do is redirect all images in posts that used 'file url' to 'post url' and my new attachment.php template.
Is this ...
0
votes
1answer
77 views
How to save media-form on custom tab
On my custom tab, I copied media-form from media_upload_gallery_form, only changed form id and action-url to reflect my tab's name. The form displayed as expected, but after click "Save All Changes", ...
0
votes
2answers
517 views
How to run WP_Query to retrieve attachments to posts only from a particular category?
I have a WP blog with a few pages and posts and several categories. I want to write a loop to retrieve images attached to the posts (not the pages) and only those from a specific category and it's ...
0
votes
2answers
2k views
Get an image from the media library. Struggling with the code?
Struggling with this code, the conditions work, the only way I can get the wp_get_attachment_url is to loop through it but then this outputs as many images from the media library and I only want one?
...
0
votes
1answer
173 views
Insert attachments from custom uploader into post (regular uploader style)
I recently started using this nifty meta box framework:
http://www.deluxeblogtips.com/meta-box-script-for-wordpress/
I really like the plupload meta box, however, I need to be able to add the ...
1
vote
1answer
303 views
Image still attached to post even after removing it as featured image
I'm sorry if this is too noob of a question, but when I upload an image and set it as the featured image then later remove it (as featured image), the media list still shows it's "Attached to" the ...
2
votes
1answer
130 views
How to set author for post AND post attachments
I have multiple author accounts on one of my WordPress installs. Often I will create a post, and set the author to be a different account. However, when I upload images into that post, their ...
1
vote
2answers
556 views
How do i show wordpress attachments from current post?
So with my blog i have a photo attachment page but it only shows to photo's at a time, and those two photo's are used as the navigation and i hate that.
I want the attachment page to show all the ...
0
votes
2answers
614 views
change attachment url to post url in wp_get_attachment_link [closed]
I am using wp_get_attachment_link to get a uploaded image.when get this it shows
attachment url in anchor. But i want to change to single post url.I tried many thinks nothing helps.
it always gives ...
0
votes
1answer
133 views
Why this plugin doesn't work with media upload page?
I found this plugin very useful ajaxed-status
It was created for post and page, and I want to apply it on media library. so I commented out the line if (is_admin() /*&& ($pagenow=='edit.php' ...
0
votes
1answer
314 views
How to get post id of first child of the same post type?
Is there a function that will let me get the post id of the first child (of the same post type, not attachment)? I could always just run a loop via wp_query but that seems like overkill. :/
The goal ...
-1
votes
1answer
524 views
Attachment page custom title?
Look what I want to do... I want to edit < title > < /title > from < head > < /head > on attachment page.
Right now I have like this: POST PARENT TITLE (no - or | here ) IMAGE TITLE - MY ...
3
votes
3answers
1k views
Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
Is there a built-in feature or plugin that allows you to attach a document to a post or page such that the actual attachment file is one thing (eg a PDF) but the thumbnail images are another (eg a ...
1
vote
1answer
798 views
How to delete orphan attachments?
I've been given the directive to "retire" about 1000 articles from a wordpress site I maintain. Deleting the posts from the DB is trivial, but how would one go about deleting the orphaned files from ...
0
votes
1answer
94 views
Is there a way to show attachment IDs on the attachment info screen?
I want to use attachment IDs for shortcodes, but if the image is published with a permalink, it's harder to find the ID.
I've found some functions online that can turn the attachment url into its ID, ...
0
votes
1answer
113 views
Excluding post thumbnail from the attachment.php when using wordpress gallery
I am looking for this answer everywhere and can't find it.
I setuo the wordpress default gallery using the attachment page which shows next and previous photos.
everything is working fine and I have a ...
1
vote
1answer
318 views
Custom page template to display all image attachments
I am tryin to insert all pictures in media to page. By meaning all pictures, everything added in blog. I ve been looking this feature all day. Is there any shortcode for that or something easy to make ...
0
votes
1answer
446 views
orderby not working for query_posts using array of IDs
I have an array of IDs that i send to query_posts to get the posts (which works fine) but it seems to always put the attachment(562) last even though it is the newest. Also tried title and ASC vs DESC ...
1
vote
1answer
382 views
Add custom field to image editor
How do I add custom field to the image editor, such as under the image 'Description' field? To be much clearer, it's where the settings for the images are after you upload an image in the attachment ...
1
vote
1answer
164 views
How would one change the default url structure of attachments?
When I click on post images it redirects in a page with a url like this: http://localhost/?attachment_id=897. Can I set the default image link like http://localhost/wp-content/uploads/2012/05/dice.jpg ...
1
vote
1answer
432 views
Link Featured Thumb to Attachment Page, If Possible
Are featured thumbs uploaded the same as other images and have their own attachment post url?
I'm trying to utilize the 3.0+ post formats and am using the featured image when creating a post under ...
0
votes
1answer
729 views
Get all images from posts with maximum number and without featured image
I recently asked a question on how to get all images from all posts - and I got a working answer, but unfortunately the code gets post-thumnbnails as well, and I didn't find a way to limit the number ...
2
votes
3answers
1k views
get attachments for all posts of particular post type
I'm making a widget that shows a set of images from recent custom posts. I want to run the following query:
SELECT p.*
FROM wp_posts p
WHERE post_type='attachment'
AND post_mime_type LIKE 'image%'
...
0
votes
1answer
207 views
SQL: Search query to get attachments only of those parents which are published
i'm having some problem creating nice 1 query to be able to get search results which includes NOT only post_type POST but also attachments. BUT if search query return attachment, i want that it won't ...
1
vote
1answer
501 views
Get post attachment images dimension and use in embed code
I am trying to make things work like where any post attachment image will generate embed code automatically.
Example: If I upload and add two images 1. 250x150 2. 600 x 160 and insert into post. Now ...
1
vote
2answers
191 views
Validate data on attachment_fields_to_save
I'm very glad that there is such a dedicated website for WP.
My problem is data validation upon saving attachment fields. I have added many custom fields to attachment/media library dialog, most of ...
1
vote
3answers
1k views
Hide “Gallery Settings” and “Insert into Post” button from Attachment window
I'm using different method to form a gallery in Wordpress, so I would like to hide an option to insert images and galleries into post for anyone but Administrator.
Can someone show me an example how ...
1
vote
1answer
632 views
wp_generate_attachment_metadata gives me an empty array
I have a custom post type and a metabox with a file input.
I can insert the attachment, but I can't update the attachment metadata and I don't know how to fix it because I don't receive any error.
...
2
votes
1answer
608 views
Uploading Multiple Attachments From Front-End With A Description
I am working on a Wordpress site that has a custom front-end submission form for adding in a post of content type, 'sketchpad'. The form has a section that allows you to upload multiple images with a ...
5
votes
1answer
295 views
Edit image / Delete image link
There is a function in Wordpress that allows to display a "edit post" link if the user has sufficient rights.
<?php edit_post_link( __( 'Edit' ), '<small class="edit-link">', ...
-1
votes
1answer
116 views
How can I attach files without using a plugin?
I want to add files from my site or from external links with files to any of my posts, and be able to add the size of the file and choose which ones it will do "File Force" and which not. I want to ...
0
votes
1answer
123 views
get_image_tag filter not working
I'm trying to get the custom field data off an attachment and display it following the image tag in a page/post using the get_image_tag filter.
I'm using the same function to get the same data and ...
0
votes
3answers
2k views
Applying automatic link class to images embedded to posts
I'd really love to be able to conditionally apply a CSS class to link elements of images embedded into posts, but I can't seem to figure this one out.
Basically what I'd like to achieve is to replace ...
0
votes
1answer
339 views
How to hide image-url if no attachment?
How can I hide the img-tag if there is no attacment?
(function is from this tutorial: http://wp.tutsplus.com/tutorials/automagic-post-thumbnails-image-management/)
<img src="<?php ...
0
votes
1answer
220 views
filter get_children to return all mime types EXCEPT 'x'
Like it says on the tin - Im trying to create a list of post attachments that includes everything except say audio, which I'll feed into a player instead.
The filter needs to be generic: 'audio' ...
2
votes
1answer
212 views
Make individual attachments private?
Is there any way to make individual attachments private similar to how a post can be made private? I've looked through various plugins but none really seem to do the job. They usually make all ...
1
vote
2answers
203 views
Converting a simple plugin to be placed inside of functions.php
First off, I know it's better practice to use plugins separately than to integrate them in functions.php but this is for a theme framework that will be deployed to multiple sites and it will be easier ...
0
votes
2answers
1k views
Media is not attached after import
I am new there and I need some help for importing a wordpress blog.
I have a old wordpress 3.1 blog (no multisites) and need to move to new hosting (a sites under multisites). I don't have the access ...
0
votes
1answer
346 views
Echo Permalink in Attachment outside of loop?
I have some code showing an image attached to a post, an image in a li list, works fine shows the image as its should.
I need the image to link through its main single post though and have tried the ...
1
vote
1answer
597 views
why when I try to insert an image attachment along with a post does wp_get_attachment_url give me a very wrong file path?
I am using a new blog on WPMS (3.0.1, updating is not an option) to aggregate posts (and their featured image) from a few blogs on the same install, and I have to do it programmatically rather than ...
0
votes
1answer
146 views
How d0 i get the number of attachments in the post
Is there a function that allows me to get the number of photo's attached to a post and that also grabs the url of the first attachment to go to the attachment page for each post?
Here is an example ...
0
votes
1answer
253 views
How do i save and retrieve custom attachment meta?
I'm trying to save if a checkbox inside of the media uploader pop up is checked, so i can retrieve it from the front end.
I'm using this code:
function filter_attachment_fields_to_edit( ...
0
votes
1answer
228 views
How to fetch only media that was already attached to a post/page?
Situation: my client has this simple gallery built with WP_Query showing the latest media added to the site:
$cola = new WP_Query(
array(
'post_type' => 'attachment',
'post_status' ...
2
votes
4answers
3k views
How to restrict access to uploaded files?
I have a restricted area on a website that can only be accessed by logged in users. Fot that I created a page template with a 'current_user_can()' condition.
My problem is that the documents attached ...
6
votes
3answers
11k views
Submit post and upload image from front-end
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.
I just followed and ...
1
vote
3answers
2k views
use wp_get_attachment_image() to show attachments
I really hope this is a facepalm moment, b/c i'm getting frustrated with this. Making a quick loop to show certain attachment images. lifted it almost straight from the codex but ...
0
votes
1answer
1k views
Getting attachment post using wp_get_attachment_link
The WordPress codex on wp_get_attachment_link says you can use the $permalink parameter to link to the page, not the image. But I would like to link to the post instead. I'm trying to get a list of ...
2
votes
1answer
125 views
Multi-line captions on attachments
How can I change the 'Caption' text input to text area, to allow for multi line captions on media uploads?