The attachments tag has no wiki summary.
0
votes
1answer
16 views
View list of all attachments on site
I'm new to WordPress theme development and I'm trying to figure out if there is a way to display a list of public attachments similar to how you can view a list of posts with a specific tag or author.
...
0
votes
1answer
12 views
Get images attached to a specific page
Is there a way to fetch the URLs and captions of all images attached to page x?
0
votes
1answer
12 views
Automatically deactivate link for attachments
It's probably super easy. I know it can be done when uploading stuffs to WP but I wonder if there is a simple snippet or setting to automatically deactivate link on attachment.
For example :
I do ...
0
votes
0answers
8 views
How can I create an edit media thickbox link?
After uploading an image to a page or post, you can click an icon/link in the top left corner to open a thickbox editor and edit its properties at any time. I have a a situation where I am uploading ...
0
votes
1answer
53 views
Add suffix to filename of uploaded images
I registered 3 custom image sizes (Double sized, for retina displays) with add_image_size: thumbnail@2x, medium@2x and large@2x.
function retina_image_sizes() {
$retina_sizes = array(
...
0
votes
1answer
24 views
open image after clicking on single.php with different stylesheet in wordpress
i have single.php like
if(have_posts())
{while(have_posts()){
the_post();
//content displayed
}}
in the content i have some images. As i click on the image it opens in very simple manner without ...
0
votes
1answer
19 views
Target all images that are not the first attachment
I'm querying image attachments on a template I'm writing.
For a layout purpose, I'd like to apply a css class to all the images that are not the first.
Here is the code I'm currently working on, I'm ...
0
votes
3answers
22 views
search through post-type attachments titles
I have a page where I show all the attachments of a page in a table which has id=10.
I have hundreds of attachments and I would like to implement an AJAX search form that uses the title of attachment ...
0
votes
1answer
17 views
Custom attachments styling in post view
I am looking for easy styling list of .doc attachments in post. For example i want to put every in <li></li> tags and do some proper styling.
So far I am get my post content this way:
...
0
votes
1answer
26 views
Load post attached images on a single page site with fancybox
I'm trying to make a single page site that will display posts as thumbnails in some part.
Then if a thumbnail is clicked, I want all the images contained in this post to be loaded with fancybox while ...
0
votes
1answer
25 views
Attachments broken after giving WordPress its own directory
I set up a fresh WordPress installation in a folder called 'wp' under root. I followed the directions for Giving WordPress Its Own Directory and pointed the URL to root successfully. I then proceeded ...
0
votes
2answers
50 views
Password protect some uploaded files, so only logged-in users can view them
I would like to protect some uploaded files, so that they are not publicly accessible (they are not accessible without a login). I'm uploading some PDF files, and I'd like to mark some of them as ...
2
votes
1answer
117 views
simple solution for restricting access to (some) uploads/downloads
Initial Situation
For a site I'm setting up I was looking into the whole field of securing uploads/downloads and restricting access to them based on user roles/capabilities. Of course I have read ...
0
votes
0answers
32 views
uploading Attachments with permalinks based on parent file structure
We are rebuilding a public-interest site centered on civil rights research & document archives. The links in years of published info posts must be preserved in WordPress, and future uploaded ...
0
votes
0answers
20 views
Editing with thickbox in wp-admin - Endless loading
I have a plugin with images inside wp-admin.
Works fine without thickbox
When clicking on an image I can edit them with this URL:
...
0
votes
0answers
26 views
get_attachment_link() adds a hashtag to URL
I'm using the get_attachment_link() function in a site I'm developing and it's returning a really weird result. For some reason it adds #main at the end of every url.
...
0
votes
1answer
31 views
How to retrieve images contained in a post
I'm working with the new media manager, and have a little issue to retrieve the attachment of the post. I'm developing a plugin which needs to retrieve all attachments of specific posts.
I first ...
0
votes
1answer
34 views
Bulk Attach Or Insert Media To Post Without Opening Post Editor
How to create a custom panel inside wp admin dashboard where we can insert media to specified posts in bulk? Here is the illustration:
As shown on the image above, it list all available media on ...
0
votes
1answer
37 views
How to search for post content and attached file names
I need to extend standard WP search functionality so that the search term is also applied to files attached to a post. In other words if user types in "annual report" then search results would include ...
0
votes
0answers
26 views
Add to the library a media from a subfolder
I'm trying to upload some media to the media library in a "uploads" subfolder. The problem is that the media is added, I can see a new entry in the media library, the database the guid of the file ...
1
vote
0answers
33 views
Show message in media-new.php
I'm wondering if there's a way to show a specific message when user uploads a file using the wp-admin/media-new.php script.
So far I have this:
function my_uploads_notice(){
global $pagenow;
...
0
votes
0answers
31 views
How to upload images using <form> as a post thumbnail?
In my custom image upload form, codes are (generally):
if(isset ($_POST['submit'])=='Submit')
{
$product_image_1=$_POST['product_image_1'];
$product_image_2=$_POST['product_image_2'];
$newPost = ...
0
votes
1answer
38 views
How to attach images that I “insert from url” into the post?
I'm trying to get the list of images in my post, to display them in the front page... the problem is that when I add a new picture from a URL, it doesn't seem to attach it.
$images =& ...
0
votes
1answer
44 views
How to add filetype to meta value when using wp_upload_bits?
I've set up a custom post type and would like to have the ability to attach files to those posts. I've got the CPT and metabox set up, and the upload function as well.
When I display the CPT on the ...
2
votes
1answer
40 views
Theme Customiser Image Control
I'm aware that one can add a control to the theme customiser to add an image.
This control returns an image URL however, and I need its attachment ID, not the image URL. Where can I intercept or ...
2
votes
1answer
108 views
Delete attachments from Front end
I am trying to make a simple media manager on the front end of my posts, as my site will have many authors. I want to give them the ability to delete any picture attachments that they have uploaded to ...
0
votes
0answers
52 views
Delete associated thumbnails when calling wp_delete_attachment
I have a somewhat straightforward script that allows users to upload their own avatar from the front-end. Another script allows them to delete their avatar, before uploading another. The ...
0
votes
2answers
44 views
How to move image attachment from post to another?
How to move image attachment from post to another (not to "Remove Permanently" and Re-Upload) ?
I'm using WordPress 3.5.0 and I have a thousand images to process. Is there a built-in function for ...
0
votes
1answer
67 views
Retrieve Image Attachments Getting Post Thumbnail Image First
I have written a funtion to get post image attachments, is there any way of ordering these images such that the first is always the post_thumbnail?
Code below
Thanks
John
function ...
2
votes
1answer
20 views
Set attached to state
In the media library every attachment post has an "Attached to" column. I've developed a plugin that adds author profile and a facebook like banner image.
I now discovered that the attachment posts, ...
0
votes
0answers
77 views
How to create resized versions of images added with wp_insert_attachment
I'm uploading images to my media gallery and setting them as my post's featured image, which is working quite well.
I'd like to generate thumbnails of these featured images, in the same way that ...
0
votes
1answer
24 views
What is the most efficient way to retrieve a group of image URL's from different attachment ID's of a specific crop size?
I have a basic slider plugin that I am attemping to make more efficient. This plugin collects an array of attachment ID's from the user to represent each image of the slider.
With these attachment ...
0
votes
0answers
34 views
Linking Attachment page to another attachment page of larger size
I am not sure is it really possible. I have a gallery. But few years ago, I did not cared to make the image size on attachment page full size. You know what I mean, attachment page shows default size ...
0
votes
0answers
86 views
Make Add media button accessible to all in front end
I am trying to add an interface in which any user(including non logged in) can create a post from the front-end. I am able to bring the default wordpress editor to front-end using the wp_editor ...
0
votes
0answers
38 views
Custom post types images go to a specific folder, not the montly one
I have a website which allows "mini sites", meaning custom post types.
We noticed that the images that are published along the mini-sites reviews go automatically to the same month, while regular ...
0
votes
0answers
48 views
delete attachment for one post without deleting actual attachment post
I'm writing custom ajax calls for media attachments from FrontEnd, I have everything read to use, except the actual logic.
I'm using WP E-Commerce plugin, where I want many images for one post. And I ...
0
votes
1answer
45 views
Upload unnattached image from frontend
I am using the below function to let users upload files from the front end. It works great except that I would like the file to NOT be attached to any post. Currently, the file is automatically ...
-1
votes
1answer
43 views
How to link images of one WP site to another WP site?
My first site is having 92 categories to display more than 10,000 SMS. Now I want to insert random images to all my posts (SMS) from my other site which is having images as per my categories in SMS ...
0
votes
2answers
50 views
the_time() returning wrong date/time (way in the future)
Within a loop, that otherwise works fine, the_time() is giving me a date and time about 25 days and a few hours ahead of the actual date.For instance, if I post today, it lists it as "April 30th, ...
0
votes
1answer
156 views
Problem adding MP3 attachments to a jPlayer playlist
I'm trying to get a post's mp3 attachments working with the jplayer plugin (with playlist addon). I have it working for a set number of attachments, but am failing to find a dynamic solution for any ...
0
votes
2answers
90 views
How to create a multidimensional array with multiple loops
I have this loop where I loop through every post of my CPT and fetch the title and the content of each post and put it into an array. That is no problem.
But as it happens I have created a repeatable ...
1
vote
1answer
58 views
Rename attachments during upload
Here's the function I use for WP to rename images during upload on the fly and set the image's filename to match the post slug.
function wpsx_5505_modify_uploaded_file_names($arr) {
// Get the ...
0
votes
1answer
39 views
How to let a role handle media without post permissions
I have a CPT to replace my "post"-post-type, but I still need to be able to use attachments. The problem is, that attachments have the post-capabilities.
I don’t want to give post capabilities to my ...
0
votes
1answer
71 views
Import Dummy Content and Post Thumbnails
I am setting up a small dummy content plugin. What I would like to do is import several posts using wp_insert_post. Then I would like to import several images using wp_insert_attachment and then ...
0
votes
0answers
23 views
Extracting Attachment Id
I am using a custom post type to upload a PDF file an then need to publish a link to that file in my template. Instead of the url link to the file wordpress spits out an attachment_id. how can I get ...
0
votes
1answer
39 views
Hiding or removing file extension displayed in HTML on attachment page
I’m doing up a photography theme in WP at the moment, and I’ve already got great help on this thread (thanks Milo!) for a previous question.
In that thread, I asked about displaying the file name of ...
1
vote
2answers
53 views
Image rotation fails to regenerate custom sized thumbnail
I'm using custom image dimensions in functions.php like this:
add_image_size( 'custom-size-thumbnail', 120, 120, true );
I uploaded some pictures with wrong orientation, so I used "edit" options to ...
1
vote
3answers
114 views
Out of memory error reporting
When users upload very large photos and memory is tight, it seems like Wordpress runs out of memory - fails to resize the uploaded photos and does not create the necessary metadata ...
2
votes
1answer
116 views
rename attachments based on parent-post-title on upload
I know there a some functions already avaible here for this task, but none of them seem to work as needed.
The best way seems to me adding a filter to wp_handle_upload_prefilter like kaiser does in ...
0
votes
1answer
57 views
Adding attachment file name to email link
I'm doing up a photography site where each post is a photo project, and each post attachment will be displayed on its own attachment page (linked to from the main post page).
On the attachment page, ...


